static public void Main(string[] args)
{
int i = 10;
string s = "Hello, world";
Console.WriteLine("i = " + i);
ModifyInt(i);
Console.WriteLine("i = " + i);
Console.WriteLine("s = " + s);
ModifyString(s);
Console.WriteLine("s = " + s);
}
static void ModifyInt(int i)
{
i = 99;
}
static void ModifyString(string s)
{
s = "Hello, I've been modified";
}
Login in to like
Login in to comment