I created a getter and Setter in Visual Basic. I have some questions though. Please look at the code below.
Here are my questions.
A.) At line 1 below, should "pieces" be declared as Private?
B.) In the IDE at lines 4 and 7 the IDE keeps changing those variables to uppercase so that the property name "Pieces" is the
same as the variable name "pieces".Should I instead define the integer pieces with an underscore: _pieces ?
That is the only way I can get around the IDE forcing the variable to become uppercase.
1 Dim pieces As Integer
2 Public Property Pieces() As String
4 Return pieces
5 End Get
6 Set (ByVal values As String)
8 End Set
9 End Property
View Complete Post