Skip to content

Instantly share code, notes, and snippets.

@EIrwin
Created November 7, 2014 22:32
Show Gist options
  • Save EIrwin/37aafebc942e351c9ee9 to your computer and use it in GitHub Desktop.
Save EIrwin/37aafebc942e351c9ee9 to your computer and use it in GitHub Desktop.
ChangeAge Test
public static void Main(string[] args)
{
Person person = new Person();
person.Age = 5;
//Attempt to change 'Age' to 10
ChangeAge(person,10);
Console.WriteLine(person.Age);
//Attempt to change 'Age' to 10
ChangeAge(ref person,10);
Console.WriteLine(person.Age);
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment