Vidyalelo
C# Programming · Q52

Basic Syntax and Data Types in C Sharp

Programming · C# Programming · question 52

Q52

For two strings s1 and s2 to be equal, which is the correct way to find if the contents of two strings are equal?

A.
if(s1 = s2)
B.
int c;
c = s1.CompareTo(s2);
Answer
C.
if (s1 is s2)
D.
if(strcmp(s1, s2))

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board