Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create enums?

Status
Not open for further replies.

rrhandle

Programmer
Dec 26, 2001
193
0
0
US
I am converting a vb6 project to ASP.NET. Below is a class I created, but I don't know if I create the Enums correctly. The application compiles without errors, but when I viewed it with Visio, I got errors referring to the enums. Could not find a single example on the web of creating enums with VB.NET. Could someone tell me if the following code is correct.





Imports System
Imports Microsoft.VisualBasic

Namespace Panels
<Serializable()> _
Public Class Panel

Private pCompID As Integer
Private pPanelSqFt As Double
Private pPanelType As String
Private pSection As String
Private pSplitNem As Integer
Private pHeight As Double
Private pLength As Double
Private pThickness As Double

Public Enum Panel3DNamesEnum
pnlFRONT = 1
pnlBACK = 2
pnlTOP = 3
pnlBOTTOM = 4
pnlSIDE_LEFT = 5
pnlSIDE_RIGHT = 6
End Enum

Public Enum ComponentTypeEnum
compHOOD = 1
compCAGE = 2
compSTAND = 3
End Enum

End Class
End Namespace

The only thing worse than being alone, is wishing you were.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top