What is the output of the following code?
using System; struct MyStructure { int i = 25; public MyStructure(int i) { this.i = i; } } class Program { static void Main(string[] args) { MyStructure myS1 = new MyStructure();//OK myS1.i = 1; Console.WriteLine(" myS1.i={0}", myS1.i); //Another way of using structure MyStructure myS2 = new MyStructure(10);//OK Console.WriteLine(" myS2.i={0}", myS2.i); //Another way of using structure MyStructure myS3; myS3.i = 100; Console.WriteLine(" myS3.i={0}", myS3.i); } }
int i = 25;// No, we cannot initialize here.