[Mono-list] enum examples from TiC# don't compile with mcs

Geoff Taylor geoff@opinionatedgeek.com
Fri, 20 Dec 2002 12:50:18 -0000


jpo234@netscape.net <jpo234@netscape.net> scribbled:

:: If the ECMA C# standard does not allow this, then it's still
:: interesting to learn what csc does with the code. Anybody with a
:: Windows machine at hand?

One quick copy&paste later, it says:

----------
>c:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc EnumTest.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.

EnumTest.cs(14,32): error CS0019: Operator '+' cannot be applied to operands
of
        type 'EnumTest.Coin' and 'EnumTest.Coin'
----------

Cheers,

            Geoff