vb System.Type.IsEnum类(方法)实例源码

下面列出了vb System.Type.IsEnum 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:Syste   
Public Enum Color
    Red
    Blue
    Green
End Enum

Class Example
   Public Shared Sub Main()
        Dim colorType As Type = GetType(Color)
        Dim enumType As Type = GetType([Enum])
        Console.WriteLine("Is Color an enum? {0}.", colorType.IsEnum)
        Console.WriteLine("Is Color a value type? {0}.", colorType.IsValueType)
        Console.WriteLine("Is Enum an enum type? {0}.", enumType.IsEnum)
        Console.WriteLine("Is Enum a value type? {0}.", enumType.IsValueType)
    End Sub 
End Class


问题


面经


文章

微信
公众号

扫码关注公众号