Skip to content

Instantly share code, notes, and snippets.

@junosuarez
Created June 13, 2012 22:57
Show Gist options
  • Save junosuarez/2927040 to your computer and use it in GitHub Desktop.
Save junosuarez/2927040 to your computer and use it in GitHub Desktop.
Lazy-evaluated getters
private string myString;
public string MyString{
get{
return myString ?? (myString = doSomething());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment