[Mono-devel-list] System.Drawing.Drawing2D.HatchStyle little bug?

psonek at email.cz psonek at email.cz
Wed Feb 11 05:16:01 EST 2004

I think I got tiny bug in HatchStyle.cs. This happens:

radek at linux:> mcs switch-test.cs /r:System.Drawing.dll
error CS0152: The label `case + 21:' is already present on this switch 
Compilation failed: 1 error(s), 0 warnings

--- Code is here:

using System.Drawing.Drawing2D;
class Foo {
        static void Main () {
                HatchStyle style = HatchStyle.DarkUpwardDiagonal;
                switch (style) {
                        case HatchStyle.DarkUpwardDiagonal:
                        case HatchStyle.WideUpwardDiagonal:

It's because WideUpwardDiagonal=21 is defined in HatchStyle.cs while it 
should be WideUpwardDiagonal=23.

I also want to ask, if it is ok that compiler didnt tell the file in which 
error occured and also no line number is mentioned. 


PS: sorry if i posted this twice - not sure now.

Objevte kouzlo digitální fotografie s fotoaparáty Hewlett-Packard. V Albico internetovém obchodu Vás čeká dobrý nákup! http://www.email.cz/aio

More information about the Mono-devel-list mailing list