?
What will be the output of the following C# code snippet?
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
string s1 = "olleH";
string s2 = "olleh";
if (s1 == s2)
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
if (s1.Equals(s2))
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
Console.ReadLine();
}
static void Main(string[] args)
{
string s1 = "olleH";
string s2 = "olleh";
if (s1 == s2)
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
if (s1.Equals(s2))
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
Console.ReadLine();
}
Join the Discussion
Login to post a comment or share your explanation.
Login