What is the output from the following code
using System; class Program { static void Change(ref int x) { x = x * 2; Console.WriteLine("Inside Change(), myVariable is {0}", x);//50 } static void Main(string[] args) { int myVariable; Change(myVariable); Console.WriteLine("Inside Main(), myVariable={0}", myVariable);//25 } }
Compile time error
We need to initialize myVariable before passing it into the Changeme() method; otherwise, we'll encounter a compilation error.