0

我在一个类中有一个枚举:

Public Class objConjuntosDeAvaliacoes    
    Const conjuntoTipoComparacao As String = "cmp"
    Const conjuntoTipoEvolucao As String = "evp"

    Function removeDoConjunto(ByVal ansSerie As Integer, 
                              ByVal ansAvaliacao As Integer) As Integer

我希望这个枚举在所有代码文件中都可用,而不必实例化类。

你是怎样做的?

4

1 回答 1

0

Enum语句常量

Public Class objConjuntosDeAvaliacoes
    .....  
    'enums
    Public Enum YourEnums
        conjuntoTipoComparacao = 1
        conjuntoTipoEvolucao = 2
    End Enum

    'public constants
    Public Const conjuntoTipoComparacao As String = "cmp"
    Public Const conjuntoTipoEvolucao As String = "evp"
    .....
.....
于 2013-01-10T14:39:08.713 回答