Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 24, 2022 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/750f7928340fb32295f47da725c6d5bf to your computer and use it in GitHub Desktop.
Save lgolubyev/750f7928340fb32295f47da725c6d5bf to your computer and use it in GitHub Desktop.
public T PropertyAssertedGet {
int getCounter = 0; // property scoped field #133
get
{
getCounter++;
Debug.Assert (getCounter <= 3,
"In my code this prop is only called 3 times, somethings terribly wrong.");
return field;
}
set;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment