What will be the output of the following C# code?
String a = "Csharp";
String b = "CSHARP";
int c;
c = a.CompareTo(b);
Console.WriteLine(c);
String a = "Csharp";
String b = "CSHARP";
int c;
c = a.CompareTo(b);
Console.WriteLine(c);
B. 1
C. -2
D. -1
Answer: Option D
Join The Discussion