Solved

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

Posted on 2015-01-11
2
209 Views
Last Modified: 2015-01-11
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

0
Comment
Question by:Mike Eghtebas
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
I agree the code should work...
http://msdn.microsoft.com/en-us/library/system.enum.getvalues%28v=vs.110%29.aspx

did you name any class/variable Enum on your side?
0
 
LVL 33

Author Comment

by:Mike Eghtebas
Comment Utility
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now