Re: Naming conventions

Carl-Adam Brengesjo <[email protected]>
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
Marcus wrote:
> Is that only for those three types? I don't see "Int32" or "Single" being 
> used, for example. So I'm very confused about this part.

Afaik, "int" is prefered to "Int32" for future backcompability on 64bit 
system when "int" will be wrapped to Int64 instead of Int32. Though at 
many places in the code both "int" and "Int32" are used. So I'm not 100% 
sure about it.

But as the naming convention doesn't mention the other types, nor state 
that the named types are merley an example but rather explicit state 
those types.

> Also, in some places, the C# names *must* be used, such as "enum Fruit: byte 
> { Apple, Orange };" (The compilers will not accept Byte here.)

Excerpt from ECMA-334:
``11.1.8 Enumeration types
An enumeration type is a distinct type with named constants. Every 
enumeration type has an underlying
type, which must be byte, sbyte, short, ushort, int, uint, long or ulong.''

And the MS csc doesn't accept Byte either, so it's a correct behaviour.

:-)

Cheers!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.