Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2015-01-11
2
Medium Priority
?
264 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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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 34

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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

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…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Loops Section Overview

916 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