Oct 8, 2010
I know this is a proper enum:
View 6 Replies
Private Enum Months
JANUARY = 1
FEBRUARY = 2
However, I want to have an enum where the string will solely be integers.
Private Enum ColumnCounts
01 = 5
02 = 4
03 = 40[code].....
Essentially, I didn't want to put the f in there, just wanted to do 01. The way this will be called is:
Select Case (nRecordType)
Because I'm not making an instance of it and not calling a constructor, there's no way to autopopulate a Dictionary.And I don't want to convert to integer so I'm not going to do an array. That is just in case eventually the value gets above 99 and the next value would be A0.I'm trying to think of easy future changes to this and backwards compatability.If you need more explanations, let me know.
Edit 2:This is what I've done now and I think it should work:
Public Class Part
Private Shared columnCounts As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer)
Public Shared Function ValidateColumns(ByRef lstFiels As List(Of String)) As Boolean[code]....
I can't verify that it's going to do what I want to, but it doesn't give me an error when I build it so I'm crossing my fingers.