Relax restriction on ConditionalAttribute when attributed to local methods. #4193
Unanswered
HobbsCode
asked this question in
Language Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Local methods attributed with Conditional("DEBUG") are currently required to be static. If the local method only captures 'this', then it is the equivalent of an instance method and should be treated like an instance method. The restriction should be relaxed to permit local methods that only capture 'this'. Code like the following would then become valid.
Beta Was this translation helpful? Give feedback.
All reactions