<?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>Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx</link><description>Q: Why don't nullable relational operators return &amp;#8220;bool?&amp;#8221; instead of &amp;#8220;bool&amp;#8220;? 
 Nullable types are a new feature of C# 2.0 . 
 When dealing with nullable types, if you write the following: 
 int? i = 15; int? j = 16; 
 the type</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#10400268</link><pubDate>Thu, 07 Mar 2013 13:26:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10400268</guid><dc:creator>BitMaster</dc:creator><description>&lt;p&gt;But I guess when you test for null references, you don&amp;#39;t think of null as undefined so you therefore expect null == null (no address == no adress).&lt;/p&gt;
&lt;p&gt;I kinda changed my opinion. I guess null == null is better.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10400268" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#10400226</link><pubDate>Thu, 07 Mar 2013 11:22:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10400226</guid><dc:creator>BitMaster</dc:creator><description>&lt;p&gt;Or you can say that Null means &amp;quot;no value&amp;quot; instead of &amp;quot;undefined&amp;quot;, which is pretty weird.&lt;/p&gt;
&lt;p&gt;In that way, Null == Null might be ok. But still Null != Null would have been better in my opinion.&lt;/p&gt;
&lt;p&gt;So C# null is a different concept from database null.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10400226" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#10400221</link><pubDate>Thu, 07 Mar 2013 11:09:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10400221</guid><dc:creator>BitMaster</dc:creator><description>&lt;p&gt;Very bad decision.&lt;/p&gt;
&lt;p&gt;And NaN != NaN in the same time.&lt;/p&gt;
&lt;p&gt;The compiler should signal a warning when comapring to null (== always false and != always true).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10400221" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#10305565</link><pubDate>Tue, 15 May 2012 20:56:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10305565</guid><dc:creator>Koen</dc:creator><description>&lt;p&gt;Klaus RM: language nazi&amp;#39;s like you will always be around. I think C# was very well thought out, and the nullable types are great and solve a great deal of problems. The ??-operator is a great help too. It&amp;#39;s right in front of you when used, and it&amp;#39;s totally readable.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10305565" width="1" height="1"&gt;</description></item><item><title>Nullable Types in .net 2.0</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#554502</link><pubDate>Sat, 18 Mar 2006 20:39:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:554502</guid><dc:creator>random ramblings....</dc:creator><description>Reminder to self for when I inevitably loose the bookmarks when my computer goes on a bookmark eating frenzy: -- Nullable Types in C# -- The Truth about Nullable Types and VB... -- Why don't nullable relational operators return bool?...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=554502" width="1" height="1"&gt;</description></item><item><title>Nullable types</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#175969</link><pubDate>Thu, 08 Jul 2004 06:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:175969</guid><dc:creator>Flier's Sky</dc:creator><description>Nullable types&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=175969" width="1" height="1"&gt;</description></item><item><title>The Truth about Nullable Types and VB...</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#148614</link><pubDate>Fri, 04 Jun 2004 20:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:148614</guid><dc:creator>Panopticon Central</dc:creator><description>Nothing doing.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=148614" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#144901</link><pubDate>Mon, 31 May 2004 14:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144901</guid><dc:creator>Kael Rowan</dc:creator><description>I found the answer to my question in section 24.1 of the C# 2.0 Spec:&lt;br&gt;&lt;br&gt;&amp;quot;The syntax T? is shorthand for System.Nullable&amp;lt;T&amp;gt;, and the two forms can be used interchangeably.&amp;quot;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=144901" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#144279</link><pubDate>Sat, 29 May 2004 04:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144279</guid><dc:creator>Talbott Crowell</dc:creator><description>I am very glad that you decided that the relational operators will return a bool (true/false).  If relational operators returned a tri-state value (true/false/null) it would make the language unbearable.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=144279" width="1" height="1"&gt;</description></item><item><title>re: Why don't nullable relational operators return bool? instead of bool?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/25/why-don-t-nullable-relational-operators-return-bool-instead-of-bool.aspx#143241</link><pubDate>Thu, 27 May 2004 19:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143241</guid><dc:creator>Kael Rowan</dc:creator><description>Is this sort of question-mark syntax in the 2.0 specification or is it for a future version of the language, such as C# 3.0?  Is the question mark a shortcut for the Nullable generic?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=143241" width="1" height="1"&gt;</description></item></channel></rss>