• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

'GetValues' not member of 'Enum' vb.net

Question: Why am I getting "[Enum].GetValues" underlined blue (see line 5) with 'GetValues' not member of 'Enum' message? What can I do to correct this.

BTW, I know this code works (see the post from it_sage at: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_28594419.html)

Private Sub Enum_Select_TypoOf()

        Dim value As List(Of Importance) = [Enum].GetValues(GetType(Importance)).Cast(Of Importance)().ToList()
 End Sub

Open in new window

Mike Eghtebas
Mike Eghtebas
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I agree the code should work...

did you name any class/variable Enum on your side?
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
No, I don't have. I searched Enum As entire solution just to make sure.

I started a new project with this code and the error went away.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now