Blog

String functions StartsWith and EndsWith are case-sensitive in .NET

Did you know that String functions StartsWith and EndsWith are case-sensitive even in VB.NET?

You will 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");


Share this post



Leave a comment


Previous Post

Next Post


\