0 votes
in C Sharp by

Code to check string are Equals() or not and check case sensitive in csharp

1 Answer

0 votes
by

Below code will helps us to find that string are equal or not and also find c# is case sensitive or not. Below code will helps you to understand that c# follow case sensitive.

using System;

public class Program

 {

  public static void Main(string[] args)

  {

   String x = "CrackYourInterview";

   String y = "CRACKYOURINTERVIEW";

   int z;

   z = x.CompareTo(y);

   Console.WriteLine(z);

  }

 }

And answer of above code is -1 which means c# is case sensitive

Related questions

0 votes
0 votes
asked May 17, 2020 in Python by sharadyadav1986
0 votes
asked Jan 14 in Sql by AdilsonLima
...