adspace


How does one compare strings in c#?

Answer Posted / Ravi Prakash Gupta

In C#, you can compare strings using the '==' operator for value comparison or the String.Equals() method for case-sensitive and culture-invariant comparisons. For case-insensitive comparisons, you can use the String.Equals(String, StringComparison) method.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can't we use a static class instead of singleton?

957


Which namespaces are necessary to create a localized application?

1143


What is an abstract class c#?

970


What is expression tree in c#?

999


How to assign Null value to Var?

1066


How do you inherit a class into other class in c#?

996