[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Naming conventions
From: |
Carl-Adam Brengesjo |
Subject: |
Re: [DotGNU]Naming conventions |
Date: |
Sat, 28 Aug 2004 08:09:17 +0200 |
User-agent: |
Mozilla Thunderbird 0.6 (Windows/20040502) |
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!