[Mono-dev] SPAM-LOW: Enums of allowed types produces error

Charlie Poole charlie at nunit.com
Sat Aug 26 13:09:49 EDT 2006


The standard says "byte, sbyte, short, ushort, int, uint, long or unlong."
 
The Microsoft compiler gives an error as well - the same error number, in
fact. :-)
 
Charlie
 



  _____  

From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of William Lahti
Sent: Saturday, August 26, 2006 1:37 AM
To: mono-devel-list at lists.ximian.com
Subject: SPAM-LOW: [Mono-dev] Enums of allowed types produces error


Using mono 1.1.13.1, mcs fails with CS1008 (Type byte, sbyte, short, ushort,
int, uint, long or ulong expected) when specifying the fully qualified class
name for any of the types byte, sbyte, etc. 

Is this a bug (like I think) or does C# not allow such usage?

This testcase shows the issue nicely:

public enum myEnum: System.Int32 {
        bad, cool
}

compiled with: mcs source.cs /target:library 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060826/45780dc4/attachment.html 


More information about the Mono-devel-list mailing list