Created
May 24, 2022 12:06
-
-
Save lgolubyev/750f7928340fb32295f47da725c6d5bf to your computer and use it in GitHub Desktop.
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 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