What will be the output of the following C# code snippet?
class Program
{
static void Main(string[] args)
{
String c = "Hello i love Csharp";
Boolean var;
var = c.StartsWith("hello");
Console.WriteLine(var);
Console.ReadLine();
}
}
class Program
{
static void Main(string[] args)
{
String c = "Hello i love Csharp";
Boolean var;
var = c.StartsWith("hello");
Console.WriteLine(var);
Console.ReadLine();
}
}A. True
B. False
C. 1
D. Run time error
Answer: Option B

Join The Discussion