Hello

> using System;
> 
> class EnumTest {
>     enum Coin: short {
>         Penny = 1,
>         Nickel = 5,
>         Dime   = 10,
>         Quarter = 25,
>         Dollar = 100
>     }
> 
>     public static void Main ()
>     {
>         short change = (short)(Coin.Penny + Coin.Nickel);
>         Console.WriteLine (change);
>     }
> }
> 
> Question: is this a bug in mcs or a bug in the book? What does csc do?

It is a bug with the example.  Operator + is not defined for two
enumerations.

Miguel

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to