5 enum Fruit { Apple, Banana, Cherry }
;
7 static int TestEnumInit (Fruit f
)
9 Fruit
[] testedFruits
= { f }
;
16 public static int Main()
18 Fruit
[] pieFillings
= { Fruit.Apple, Fruit.Banana, Fruit.Cherry }
;
20 if (pieFillings
[0] != Fruit
.Apple
)
22 if (pieFillings
[1] != Fruit
.Banana
)
24 if (pieFillings
[2] != Fruit
.Cherry
)
27 if (TestEnumInit (Fruit
.Apple
) != 0)