como usar o enum em vbnet
Public Enum MyEnum As Byte
Zero
One
Two
End Enum
como usar o enum em vbnet
Public Enum MyEnum As Byte
Zero
One
Two
End Enum
como usar o enum em vbnet
Public Enum InterfaceColors
MistyRose = &HE1E4FF&
SlateGray = &H908070&
DodgerBlue = &HFF901E&
DeepSkyBlue = &HFFBF00&
SpringGreen = &H7FFF00&
ForestGreen = &H228B22&
Goldenrod = &H20A5DA&
Firebrick = &H2222B2&
End Enum
como usar o enum em vbnet
Enum EggSizeEnum
Jumbo
ExtraLarge
Large
Medium
Small
End Enum
Public Sub Iterate()
Dim names = [Enum].GetNames(GetType(EggSizeEnum))
For Each name In names
Console.Write(name & " ")
Next
Console.WriteLine()
' Output: Jumbo ExtraLarge Large Medium Small
Dim values = [Enum].GetValues(GetType(EggSizeEnum))
For Each value In values
Console.Write(value & " ")
Next
Console.WriteLine()
' Output: 0 1 2 3 4
End Sub
como usar o enum em vbnet
Public Sub Scramble(ByVal size As Egg.EggSizeEnum)
' Process for the three largest sizes.
' Throw an exception for any other size.
Select Case size
Case Egg.EggSizeEnum.Jumbo
' Process.
Case Egg.EggSizeEnum.ExtraLarge
' Process.
Case Egg.EggSizeEnum.Large
' Process.
Case Else
Throw New ApplicationException("size is invalid: " & size.ToString)
End Select
End Sub
como usar o enum em vbnet
Enum SecurityLevel
IllegalEntry = -1
MinimumSecurity = 0
MaximumSecurity = 1
End Enum
como usar o enum em vbnet
Public Class Egg
Enum EggSizeEnum
Jumbo
ExtraLarge
Large
Medium
Small
End Enum
Public Sub Poach()
Dim size As EggSizeEnum
size = EggSizeEnum.Medium
' Continue processing...
End Sub
End Class
como usar o enum em vbnet
[ <attributelist> ] [ accessmodifier ] [ Shadows ]
Enum enumerationname [ As datatype ]
memberlist
End Enum
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us