David Stone's Blog

I'm open to suggestions for a subtitle here! (Really!)

CLSCompliant...is not...CLSCompliant

/*
To make an assembly CLSCompliant, you must add the CLSCompliant attribute.

To conform to CLSCompliant rules, your 3-letter mnemonics must be Pascal case.
(Only 2-character codes are all upper-case)

By adding CLSCompliant(true) attribute to your assembly you are not longer CLSCompliant because you are using a 3-letter mnemonic that is not Pascal case. (CLS)

My head hurts.
*/

Anybody care to comment?

Comments

Andy Smith said:

"To conform to CLSCompliant rules, your 3-letter mnemonics must be Pascal case"

I'm fairly certain that this is false.
Later in the thread, the guy references fxcop as his source for this.

The fxcop rule he references comes from the design guidlines, not the cls spec. it is only a suggestion.
# January 13, 2004 2:53 PM

David Stone said:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconabbreviations.asp states:

When using acronyms, use Pascal case or camel case for acronyms more than two characters long. For example, use HtmlButton or htmlButton. However, you should capitalize acronyms that consist of only two characters, such as System.IO instead of System.Io.

And this is from the design guidelines. Of course, maybe they're just like "The Code" in Pirates of the Carribean...not a set of rules, more like suggestions. ;)
# January 13, 2004 2:58 PM

Brad Abrams said:

Thanks for bringing this up... I posted some thoughts here: http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx
# January 13, 2004 5:47 PM

TrackBack said:

^_^,Pretty Good!
# April 10, 2005 6:27 AM

CLSCompliant vs. ClsCompliant » hangy.de‽ said:

I was wondering about the same. :)

# March 31, 2008 4:01 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)