Joe,
As Doug stated, it would break encapsulation.
I would recommend only adding a Get property, as generally you really do not
want classes outside the form to change the instance of the control. Also I
rarely expose the control itself as a property, normally I only expose one
or two properties of the control as properties of my form.
For example, my form would have a get/set String property for FirstName,
that modified the Text property of the FirstNameTextBox control. The other
properties of the FirstNameTextBox I want to be under 100% control of the
form itself.
Hope this helps
Jay
"Joe Thompson" <an*******@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com...
Hi,
I am using VC++.net 2003. Whenever I place a control on a winform, it is
declared as private. Then I have to write set and get methods to access
these controls from a calling form. Why are they declared private instead
of public? Does it hurt to change them to public? It seems like it would
be much faster to set/get properties directly.
Thank you,
Joe