What will be the output of the following C# code snippet? [code] class Program { static void Main(string[] args) {

Ngô Thị Vân

New member
What will be the output of the following C# code snippet?
Code:
 class Program
 {
     static void Main(string[] args)
     {
         String s1 = "Hello World";
         String s2 = s1.Substring(0, 4);
         Console.WriteLine(s2);
         Console.ReadLine();
     }
 }
A. Hello
B. Hell
C. H
D. Hello World
 

Tìm kiếm

Back
Top