Mike,
In addition to the other comments.
If you have .NET 2.0 (VS 2005), you can use the overloaded String.IndexOf
that accepts a StringCompariso n parameter:
http://msdn2.microsoft.com/en-us/lib...US,VS.80).aspx
Either StringCompariso n.CurrentCultur eIgnoreCase or
StringCompariso n.InvaiantCultu reIgnoreCase should give you what you are
after...
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"MikeLing" <Mi******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.com...
| Hi,
|
| String.IndexOf is case sensitive so I need to covert to lower before
testing
| the string contains a given string. In VB this is:
|
| Instr(Lcase(Str ingToTest, "StringToCheckF or"))
|
| What is the C# equivilent? The closest I've comeup with is:
|
| string lowerString = testString.ToLo wer();
| lowerString.Ind exOf("checkstri ng")
|
| Thanks,
|
| Mike