Skip to content

Instantly share code, notes, and snippets.

@TerribleDev
Last active April 2, 2016 22:53
Show Gist options
  • Save TerribleDev/74245531420450361f723a4b2754f908 to your computer and use it in GitHub Desktop.
Save TerribleDev/74245531420450361f723a4b2754f908 to your computer and use it in GitHub Desktop.
get set
public class main
{
public string awesome {get;set;}
public string dawg {get {return "yo dawg"}}
public string coolio {get; private set;}
public string customSet {get; set{this = value}}
}
public class student{
public string FirstName {get;set;}
public string LastName {get;set;}
public string Name {get{return $"{FirstName} {LastName}";} // basically FirstName + " " + LastName
}
public class run
{
public void runts(){
var t = new main();
t.awesome = "yes!!!";
Console.WriteLine(t.awesome);
Console.WriteLine(t.dawg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment