Solved

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

Posted on 2015-01-11
2
216 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
ID: 40543032
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
ID: 40543036
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb.net checkbox 7 47
Extracting last characters in a substring 5 28
RLDC Reporting in Visual studio 11 16
Create a datatable in vb.net dynamically 1 15
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 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