dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Tuesday Nov 7th 2017 by Srinath M S

Language: .NET, Expertise: Intermediate - We often compare two strings to the same case and then compare them to see if they are the same. Learn an easier way.

We often compare two strings to the same case and then compare them to see if they are the same. Instead, we can use the StringComparison class's InvariantCultureIgnoreCase property.

String.Equals('stringOne', 'Stringone', StringComparison.InvariantCultureIgnoreCase)
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved