DateTime is not CLS compliant

  • Thread starter Thread starter John Mark Howell
  • Start date Start date
Are you sure ? I checked the doc and it doesn't seem to me it's marked as
non compliant...

Where did you saw this ?

Patrice
 
ms-help://MS.MSDNQTR.2004APR.1033/cpguide/html/cpconWhatIsCommonLanguageSpecification.htm

States:


The .NET Framework class library includes types that correspond to the
primitive data types that compilers use. Of these types, the following are
CLS-compliant: Byte, Int16, Int32, Int64, Single, Double, Boolean, Char,
Decimal, IntPtr, and String. For more information about these types, see the
table of types in .NET Framework Class Library.
 
John Mark Howell said:
ms-help://MS.MSDNQTR.2004APR.1033/cpguide/html/cpconWhatIsCommonLangu
ageSpecification.htm

States:


The .NET Framework class library includes types that correspond to the
primitive data types that compilers use. Of these types, the following are
CLS-compliant: Byte, Int16, Int32, Int64, Single, Double, Boolean, Char,
Decimal, IntPtr, and String. For more information about these types, see the
table of types in .NET Framework Class Library.

Yes, but DateTime isn't a primitive data type to start with, so that
doesn't really say anything :(
 
It just tells that among *primitive* datatypes those are complaint (unlike
unsigend integer for example). It doesn't say all other tpyes are non
compliant.

See rather the doc for the type you are looking for. when non compliant
you'll see it marked with a CLSCompliant attribute set to false..

Patrice
 
Back
Top