Created
November 7, 2014 22:32
-
-
Save EIrwin/37aafebc942e351c9ee9 to your computer and use it in GitHub Desktop.
ChangeAge Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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