ExamVeda
Login
Home
Arrays and Strings in C Sharp
?

What will be the output of the following C# code?
static void Main(string[] args)
{
    string s1 = "Hello";
    string s2 = "hello";
    if (s1 == s2)
    Console.WriteLine("Equal");
    else
    Console.WriteLine("Unequal");
    if (s1.Equals (s2))
    Console.WriteLine("Equal");
    else
    Console.WriteLine("Unequal");
    Console.ReadLine();
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.