Use Enum in a Module in different class

  • Thread starter Thread starter Claudio111
  • Start date Start date
C

Claudio111

Guest
I'm using Enum for the first time and of cource I'm a bit confused so I ask for help.

I have an Enum in a Module like the following

Module ModEnumTag
Private Enum TagList
AN '- accetta caratteri stampabili
AA '- accetta solo lettere
DB '- nome per database
NIP '- accetta solo numeri interi positivi
NI '- accetta numeri interi positivi e negativi
NDP '- accetta numeri decimali solo positivi
ND '- accetta numeri decimali
End Enum
End Module

Now in a WinForm I have a Datagridview and I set a Tag for each column in the DataGridView.

Before going ahead with the application I wish to control if every Tag is one of the value in the Enum . How to do that considering that the Enum is in a Module ?

This is the loop I wish to use


Private Sub TagControl()

For Each col As DataGridViewColumn In DGV.Columns
Dim coltagvalue As String = col.Tag.ToString

''' check if ColTagValue is in the Enum
''' ho to do ?

Next

End Sub



Thanks for help

Claudio

Continue reading...
 
Back
Top