Is it possible in an C# attribute to explicitly check what named parameters are set?
The problem is that I have a couple of parameters of type bool in an attribute, and I want to explicitly check which one of them are set. I know I could probably make them nullable and check against that in the code, but is there a better way?
This appears to do what you want, assuming you control the attribute itself:
Results:
I’m not sure whether it’s really a good idea, mind you…