Solved

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

Posted on 2015-01-11
2
219 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 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

830 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