+ 1

why there is no output?

class Program { static void Main(string[] args) { Test one = new Test(33); Console.Read(); } } class Test { public const int x = 3; public readonly int y; public Test(int yy) { this.y = yy; } public void Method(int x, int y) { Console.WriteLine(x); Console.WriteLine(y); } }

6th Aug 2017, 2:06 PM
Raffi Ohannesian
Raffi Ohannesian - avatar
2 Respostas
+ 5
Because you never called Method(), so nothing will be output.
6th Aug 2017, 2:19 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
yes !
6th Aug 2017, 4:00 PM
Raffi Ohannesian
Raffi Ohannesian - avatar