Link to home
Start Free TrialLog in
Avatar of r3nder
r3nderFlag for United States of America

asked on

End of statement expected

 Public Sub _EMPPINENTERED() [b]As String() = Nothing [/b]
    End Sub
    Public ReadOnly Property EMPPINENTERED() As String()
        Get
            Return EMPPINENTERED = DesanitizeMap(Convert.ToString(EMPPINENTERED))
        End Get

    End Property

Open in new window

Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

what are you trying to do? I can't even read the code!
*** Wild Guess! ***

You're probably trying for something like this:
    Private _EMPPINENTERED As String() = Nothing

    Public ReadOnly Property EMPPINENTERED As String()
        Get
            Return DesanitizeMap(_EMPPINENTERED)
        End Get
    End Property

Open in new window

SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'll only add that it's bad style to write a property which executes a method under the hood. As a consumer of your property, I should expect that accessing your property has no side effects on the class itself. It's apparent from the code that you've posted, but I would be concerned about what the DesanitizeMap method is actually doing. If you are going to call a method from within a property, then just make a method, and your new method calls the DesanitizeMap. Methods are expected to potentially incur side effects.
Avatar of r3nder

ASKER

ThanksJACK AND mike,
it woks now