U
UJ
I know how to define enums, and they work great.
But is there any way to define the same time of thing but give them actual
values?
For instance, I'd like to define something with the idea like this:
Public Enum TMCContentStatus as string
PrevApproved = "P"
ToBeAdded = "A"
ToBeDeleted = "D"
AddDenied = "X"
DeleteDenied = "Y"
Approved = " "
End Enum
This way, I can then later do the folllowing command and it would be true:
dim junk as TMCContentStatus
junk = TMCContentStatus.PrevApproved
if ( junk = "P" ) then....
I know I could do this right now with enums but I need to have specific
values to save into a database.
Any ideas on how to do this?
TIA
Jeffrey.
But is there any way to define the same time of thing but give them actual
values?
For instance, I'd like to define something with the idea like this:
Public Enum TMCContentStatus as string
PrevApproved = "P"
ToBeAdded = "A"
ToBeDeleted = "D"
AddDenied = "X"
DeleteDenied = "Y"
Approved = " "
End Enum
This way, I can then later do the folllowing command and it would be true:
dim junk as TMCContentStatus
junk = TMCContentStatus.PrevApproved
if ( junk = "P" ) then....
I know I could do this right now with enums but I need to have specific
values to save into a database.
Any ideas on how to do this?
TIA
Jeffrey.