Thursday, August 7, 2008

The string function "EndsWith" is case-sensitive

Did you know that "EndsWith" String function is case-sensitive even in VB.NET?

You need to make sure you are looking for the correct string, since 'abc' with case-sensitivity is different than 'ABC'.

So, if your function is looking for 'abc', you must make sure that you make adjustments to the string, in order to catch things like this.

To do this, you would need to change:


myString.EndsWith("abc");

to

myString.ToLower.EndsWith("abc");

Hire Me

Follow me on Facebook

Follow me

Do you find this Blog helpful?

Follow by Email

About Me

My Photo
Expert Senior Software Developer

Microsoft Business Card