C
C#•2w ago
Sandipan

BindingFlags of System.Reflection

Can you please explain me the concept and importance of BindingFlags of System.Reflection? I have the read the MS documentation but still in doubt. Thanks
5 Replies
🕊 ILoveBirds 🕊
according to the docs it says 'Specifies flags that control binding and the way in which the search for members and types is conducted by reflection.', don't they act as filters?
🕊 ILoveBirds 🕊
static specifies* that static members are to be included in the search
Sandipan
SandipanOP•2w ago
Why we need our members searchable? Shouldn't we keep them hidden anyway?
Jimmacle
Jimmacle•2w ago
if you're using reflection you don't care about that anymore it doesn't have to follow accessibility rules reflection exists to get meta-information about types and work with them outside the normal constraints of the language

Did you find this page helpful?