Returns true if the string matches the pattern which may contain * and ? wildcards.

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static bool Match(
	this string s,
	string pattern,
	bool caseSensitive
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function Match ( 
	s As String,
	pattern As String,
	caseSensitive As Boolean
) As Boolean
Visual C++
public:
[ExtensionAttribute]
static bool Match(
	String^ s, 
	String^ pattern, 
	bool caseSensitive
)
F#
static member Match : 
        s : string * 
        pattern : string * 
        caseSensitive : bool -> bool 

Parameters

s
Type: System..::..String
String to match
pattern
Type: System..::..String
Pattern
caseSensitive
Type: System..::..Boolean
Defines if the match is case sensitive

Return Value

Type: Boolean
True if the string matches, false otherwise

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also