Feature Request: Provide a new function 'IsInit' in PropertyInfo to test the new init of c#9 #42495
Unanswered
moh-hassan
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
c# 9 introduced an Init-only properties 'init'.
Example:
It's needed to test if the property has
Init
using reflection.@YairHalberstadt provide a solution
It's nice if BCL contain a property to test 'Init' like:
bool isInit= propertyInfo.SetMethod.IsInit
Beta Was this translation helpful? Give feedback.
All reactions