What will be printed out as result of the following code execution?
 
       public static void Foo(params string[] lines)
       { 
           foreach (string l in lines) {  
                Console.Write(l);  
             } 
        }

        public static void Main() 
       {  
             string[] data = new string[] { "1", "2", "3" };     
             Foo(data); 
             Foo("A", "B", "C"); 
        }
 
Explanation
Foo method accepts undefined number of strings as parameters. Predefined array of strings can also be passed into it

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести