Re: Compiler Error CS0702

Tech-Archive recommends: Speed Up your PC by fixing your registry



My previous post was mostly to correct your claim that the existence
of System.Enum was unknown to the spec ;)

Yeah, I had forgotten that there are mentions of it in the Microsoft spec
(which I could regard as being "C# as implemented by the Visual C#
compiler"), and I have now downloaded the ECMA spec and checked the sections
mentioned.


I also took a quick look at the ANSI C spec, which clearly separates the
_language_ (chapter 6) from the _library_ (chapter 7), and I feel that that's
how the ECMA standard should handle C#. A _language_ shouldn't require any
particular items to exist in the _library_; much less, specify limits on how
they are to behave.

The language can say: "You must support enums, the syntax for creating one
is... and the way to access the members is..."

Then an implementer can say: "Our implementation supports enums with the
specified syntax, we support them through the use of a class named
WidgetCo.Enum, and this class also has some static methods to provide other
ways of accessing the members. (Parse, GetValues, etc.)"

.