IsMatch() публичный Метод

Indicates whether the wildcard pattern finds a match in the specified input string.
/// input is null. ///
public IsMatch ( string input ) : bool
input string /// The string to search for a match. ///
Результат bool
Пример #1
0
 /// <summary>Indicates whether the specified wildcard pattern finds a match in the specified input string.</summary>
 /// <param name="pattern">
 /// The string that represents the wildcard pattern.
 /// </param>
 /// <param name="input">
 /// The string to search for a match.
 /// </param>
 /// <param name="options">
 /// The wildcard pattern options.
 /// </param>
 /// <param name="comparisonType">
 /// The type of comparison.
 /// </param>
 /// <returns>
 /// true if the wildcard pattern finds a match; otherwise, false.
 /// </returns>
 /// <exception cref="ArgumentNullException">
 /// input is null.
 /// </exception>
 public static bool IsMatch(string pattern, string input, WildcardPatternOptions options, StringComparison comparisonType)
 {
     var wildcard = new WildcardPattern(pattern, options, comparisonType);
     return wildcard.IsMatch(input);
 }
Пример #2
0
        /// <summary>Indicates whether the specified wildcard pattern finds a match in the specified input string.</summary>
        /// <param name="pattern">
        /// The string that represents the wildcard pattern.
        /// </param>
        /// <param name="input">
        /// The string to search for a match.
        /// </param>
        /// <param name="options">
        /// The wildcard pattern options.
        /// </param>
        /// <param name="comparisonType">
        /// The type of comparison.
        /// </param>
        /// <returns>
        /// true if the wildcard pattern finds a match; otherwise, false.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// input is null.
        /// </exception>
        public static bool IsMatch(string pattern, string input, WildcardPatternOptions options, StringComparison comparisonType)
        {
            var wildcard = new WildcardPattern(pattern, options, comparisonType);

            return(wildcard.IsMatch(input));
        }