<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx</link><description>David&amp;#8217;s recent blog made it clear to me that we are not being clear on the distinction between the CLS and the Design guidelines. Although they were developed at the same time, they are developed for very different purposes. In david&amp;#8217;s comments</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: CLSCompliant...is not...CLSCompliant</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58354</link><pubDate>Wed, 14 Jan 2004 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58354</guid><dc:creator>David Stone's Blog</dc:creator><description /></item><item><title>re: The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58355</link><pubDate>Tue, 13 Jan 2004 22:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58355</guid><dc:creator>David Stone</dc:creator><description>Oh cool. Thanks for clearing that up. So is it a one way relationship then? Adhering to the guidelines guarantees adhering to the CLI spec, but not vice versa? Or is there stuff left out of the guidelines that are in the spec?</description></item><item><title>re: The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58784</link><pubDate>Thu, 15 Jan 2004 01:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58784</guid><dc:creator>Jerry Pisk</dc:creator><description>I have a question about the part of those guidelines that says that string properties should never return null. Does anybody (Brad?) know the answer to that? I mean, an empty string is something else than a missing string in many contexts.</description></item><item><title>re: The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58847</link><pubDate>Thu, 15 Jan 2004 06:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58847</guid><dc:creator>Brad Abrams</dc:creator><description>The problem with returning null from a property that returns a string or array is that many of our developers expect to be able to index into the results... That is it is much nicer to be able to do:&lt;br&gt;string firstName = n.GetFullName ()[0];&lt;br&gt;rather than&lt;br&gt;string temp = n.GetFullName ();&lt;br&gt;if (temp != null) {&lt;br&gt;   string firstName = temp[0];&lt;br&gt;}&lt;br&gt;&lt;br&gt;It gets even harder when you consider foreach hides this slightly... Which do you like better:&lt;br&gt;&lt;br&gt;foreach (Type t in assem.GetTypes()) {&lt;br&gt;}&lt;br&gt;or&lt;br&gt;Type[] types = assem.GetTypes();&lt;br&gt;if (types != null) {&lt;br&gt;   foreach (Type t in types) {&lt;br&gt;   }&lt;br&gt;}&lt;br&gt;&lt;br&gt;</description></item><item><title>re: The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58849</link><pubDate>Thu, 15 Jan 2004 06:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58849</guid><dc:creator>Brad Abrams</dc:creator><description>David has a good question above as well... Yes.  There is a Design Guideline rule that says you should adhear to the CLS, so in a way the Design Guidelines is a super set but only by reference... we don't repeat all the CLS rules.  &lt;br&gt;&lt;br&gt;The best way to adhear to the CLS is to use the compiler support (today only in C#, but commig in the other MS languages soon)... You just put the [assembly:CLSComplaint(true)] in your project and the compiler helps you ahear. &lt;br&gt;</description></item><item><title>re: The CLS and the Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#58860</link><pubDate>Thu, 15 Jan 2004 07:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58860</guid><dc:creator>Jerry Pisk</dc:creator><description>Brad, the same people also expect that the array will have at least one element, so not only you should never return a null object instead of an array but obviously you should also populate it with the maximum number of elements developers might expect to get back (your first example will fail if you return an empty array and you should return at least four empty strings in it, first, last, middle initial and title). I'm sorry, that rule only encourages developers not to check return value which is a very bad practice.</description></item><item><title>New and Notable 35</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#59908</link><pubDate>Sun, 18 Jan 2004 19:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:59908</guid><dc:creator>Sam Gentile's Blog</dc:creator><description /></item><item><title>A compilation of new .NET Design Guidelines</title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#77095</link><pubDate>Fri, 20 Feb 2004 18:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:77095</guid><dc:creator>Ken Brubaker</dc:creator><description>For my own reference, I thought I'd compile a quick list of design guidelines added by Brad Abrams, et al.</description></item><item><title>What is the CLS: Common Language Specification </title><link>http://blogs.msdn.com/brada/archive/2004/01/13/58352.aspx#93343</link><pubDate>Sun, 21 Mar 2004 03:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:93343</guid><dc:creator>Brad Abrams </dc:creator><description /></item></channel></rss>