B
Bruce W.1
Why does .Net use Get and Set accessors?
So a class has a property, why not just change or get it directly like this:
MyClass.MyValue = value;
Rather than:
Set
{
MyValue = value;
}
Accessing it with Get and Set lets you change permissions, other than
that I don't see the point.
So why does .Net use Get and Set accessors?
Thanks for your help.
So a class has a property, why not just change or get it directly like this:
MyClass.MyValue = value;
Rather than:
Set
{
MyValue = value;
}
Accessing it with Get and Set lets you change permissions, other than
that I don't see the point.
So why does .Net use Get and Set accessors?
Thanks for your help.