J
jason
Though this code appears to work, I suspect it could be streamline.
Total Noob Here.
public bool isit(string c1)
{
string color1 = "blue green red";
Regex re = new Regex("@"+c1, RegexOptions.IgnoreCase |
RegexOptions.Multiline);
if (re.Matches(color1).Count > 0)
{
return (true);
}
else
{
return (false);
}
==
I found a sample on the net that does this
if (re.color1 != 0 )
But I get an error about Regex not having a definition for color1
==
Also, what if color1 was an enum, how would test the search string can
be found in any of the items?
Total Noob Here.
public bool isit(string c1)
{
string color1 = "blue green red";
Regex re = new Regex("@"+c1, RegexOptions.IgnoreCase |
RegexOptions.Multiline);
if (re.Matches(color1).Count > 0)
{
return (true);
}
else
{
return (false);
}
==
I found a sample on the net that does this
if (re.color1 != 0 )
But I get an error about Regex not having a definition for color1
==
Also, what if color1 was an enum, how would test the search string can
be found in any of the items?