What will be the output of the following C# code snippet?
class Program
{
static void Main(string[] args)
{
String s1 = "Hello i love Csharp";
StringBuilder s2 = new StringBuilder(s1);
Console.WriteLine(s1.Equals(s2));
Console.ReadLine();
}
}
class Program
{
static void Main(string[] args)
{
String s1 = "Hello i love Csharp";
StringBuilder s2 = new StringBuilder(s1);
Console.WriteLine(s1.Equals(s2));
Console.ReadLine();
}
}
A. True
B. False
C. 0
D. Compile time error
Answer: Option B
Join The Discussion