End of statement expected

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

    End Property

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
what are you trying to do? I can't even read the code!
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
*** Wild Guess! ***

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

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

Open in new window

Jacques Bourgeois (James Burger)PresidentCommented:
And except for a comment, you cannot enter anything after the declaration of a sub. The thus compiler sees your As String() = Nothing as misplaced, because you should have an end of line after the ( ), thus the error message that you get

Also, As String() = Nothing is meaningless in VB syntax. You seem to be using some kind of tag, but VB does not uses tags. Where does this syntax comes from? In which language?

Éric has a very good question, and Mike a guess that is in my opinion the best thing a VB programmer could understand from what you sent us.

Please, when you post something, add some details. Seeing your code, we can easily spot why you get that particular error message, but we have not enough details with the simple post title and code to understand what you are doing and give you a solution.
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Jacques Bourgeois (James Burger)PresidentCommented:
And seeing the result of posting my answer, where I simply cut and paste what you put at the end of the declaraion, I suddenly understand that you possibly wanted to attract the attention to that part of the code by displaying it in bold. This does not work inside of code blocks in the Expert-Exchange interface.

Which lead me to think that what you wanted to do was the following:

 Public Sub _EMPPINENTERED() As String()

This does not work, because a Sub does not return any value. So, once again, you get that error message because the compiler expects the end of the line after _EMPPINENTERED().

When you want to return a value in VB, you define a Function, not a Sub.

 Public Function _EMPPINENTERED() As String()
     Return a     'Where a is the string array that you want to return as a result
 End Function

But that would not make much sense, because why would you need a function and a property with basically the same name. Once again, Mike's guess might have more sense.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽Commented:
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.
r3nderAuthor Commented:
ThanksJACK AND mike,
it woks now
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.