[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] Should this code compile or now ?

From: Rhys Weatherley
Subject: Re: [Pnet-developers] Should this code compile or now ?
Date: Tue, 3 Jun 2003 14:24:25 +1000
User-agent: KMail/1.4.3

On Tuesday 03 June 2003 05:32 am, Gopal V wrote:

> Cscc does spray errors all around the place for this , but I'll
> fix it only after I get the behaviour confirmed.
> Could someone test this and tell me which line it b0rks ?

The operators in the enum definitions are OK, according to csc:

    public enum AllAnimals
        Rex= Dino + Dinosaurs.Rex,
        Stegy= Dino + Dinosaurs.Stegy,
        Whale= Mammals + Aquatic.Whale,
        Dolphin= Mammals + Aquatic.Dolphin,

But the one in actual method code is not:

    public static void Main()
        AllAnimals m= AllAnimals.Dino + Dinosaurs.Rex ;

This one gives an error.

Good luck trying to fix this - you'll probably have to make the operators 
modal with an ILGenInfo flag for "evaluating an enum constant".  Ick!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]