Đ Đức Lưu New member Sep 18, 2021 #1 What will be the output of the following C# code snippet? Code: class Program { static void Main(string[] args) { String c = "i love Csharp"; bool a; a = c.StartsWith("I"); Console.WriteLine(a); Console.ReadLine(); } } A. true B. false C. 0 D. 1
What will be the output of the following C# code snippet? Code: class Program { static void Main(string[] args) { String c = "i love Csharp"; bool a; a = c.StartsWith("I"); Console.WriteLine(a); Console.ReadLine(); } } A. true B. false C. 0 D. 1
Đ Đặng Thu Hà New member Sep 18, 2021 #2 Answer: b Explanation: StartsWith() method is case sensitive “i” and “I” are treated differently, hence false is stored in a. Output: Code: false Upvote 0 Downvote
Answer: b Explanation: StartsWith() method is case sensitive “i” and “I” are treated differently, hence false is stored in a. Output: Code: false