I have a question regarding "Public Property" to access a private variable. If I am following the book right and I usually do I have this syntax correct. I mean literally copied right out of Tony Gaddis's bible here but MSVS is throwing me an an error. This is the code I have, its literally just the beginning declarations for a small bank account assignment.
The error I get says "intBalance is already declared as private "intBlance" as integer in this class.Code:Public Class AccountClass Private intBalance As Integer Private intRate As Integer Private intIntrest As Integer Private intTransactions As Integer Public Property intBalance() As Integer Get Return intBalance End Get Set(ByVal value As Integer) End Set End Property
I have no other idea how to get this to fly since I'm doing the same thing that is in the book. Anyone throw me a hand?





Reply With Quote