Skip to content

Instantly share code, notes, and snippets.

@TangChr
Last active November 21, 2015 12:57
Show Gist options
  • Save TangChr/a500075c0b2fad02a7c0 to your computer and use it in GitHub Desktop.
Save TangChr/a500075c0b2fad02a7c0 to your computer and use it in GitHub Desktop.
C#: Match string with wildcard
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
namespace TangChr.Tools
{
public static class StringMatch
{
public static bool IsWildcardMatch(string search, string source)
{ // Wildcard: *
return Operators.LikeString(source, search, CompareMethod.Text);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment