Avatar of r3nder
r3nder
Flag 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

Visual Basic.NET.NET ProgrammingASP.NET

Avatar of undefined
Last Comment
r3nder

8/22/2022 - Mon
Éric Moreau

what are you trying to do? I can't even read the code!
Mike Tomlinson

*** 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
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
kaufmed

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.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
r3nder

ASKER
ThanksJACK AND mike,
it woks now