Skip to content

Instantly share code, notes, and snippets.

Created September 20, 2016 07:34
Show Gist options
  • Select an option

  • Save anonymous/bab012a37b8ebd3773cd1cdcd8e28ee5 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/bab012a37b8ebd3773cd1cdcd8e28ee5 to your computer and use it in GitHub Desktop.
/*********
* This Gist was created at CSharpPad.com
* To run this file, open http://csharppad.com/gist/b69d07f35765a59cc8512a6ea7bca6e4
**********/
public class Person
{
public string Name { get; set; }
private int _age;
public int Age
{
get { return _age; }
set { _age = value; }
}
public Person(string name, int age)
{
Name = name;
Age = age;
}
}
var person = new Person("erik", 40);
Console.WriteLine(person.Age);
//--------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment