if there are two public properties in a class, and i will need either of them to be filled by who ever creates the object of this class; is there a way in C# that can impose this behavior?
So basically if Property1 has been given a value, the user should not be able to give a value to Property2, or vice-verse?
If NOT, is there any best practice to do this, instead of creating 2 separate classes, with Property1 in one class, and Property2 in the second class?
Or may be a Method Attribute that can notify the user about this behavior? would that work?
you can add code in the setter. something kinda like this…