Hola
Como se usa el flags en Fmk 2.0?
He copiado esto pero me dice que flags no es miembro
Con esto puedo hacer por ejemplo lo que hace el msgbox de yesno+default+etc...?
<Flags()> Public Enum DinnerItems As Integer
None = 0
Entree = 1
Appetizer = 2
Side = 4
Dessert = 8
Beverage = 16
BarBeverage = 32
End Enum
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
a()
End Sub
Private Sub a()
Dim myOrder As DinnerItems = DinnerItems.Appetizer Or DinnerItems.Entree Or _
DinnerItems.Beverage Or DinnerItems.Dessert
Dim flagValue As DinnerItems = DinnerItems.Entree Or DinnerItems.Beverage
Console.WriteLine("{0} includes {1}: {2}", myOrder, flagValue, myOrder.HasFlag(flagValue))
'Console.WriteLine("{0} includes {1}: {2}", myOrder, flagValue, myOrder And Pets.Dog = Pets.Dog)
End Sub