<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/1.5.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: The ?? operator (C# 2.0)</title>
	<link>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/</link>
	<description>General musings and programming stuff</description>
	<pubDate>Mon, 08 Sep 2008 13:53:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1.3</generator>

	<item>
		<title>by: Anon</title>
		<link>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-148270</link>
		<pubDate>Mon, 07 Apr 2008 11:03:44 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-148270</guid>
					<description>Vin K, that code can be written as the following :

BookId = dRow[&amp;#34;BookId&amp;#34;] as int?;</description>
		<content:encoded><![CDATA[	<p>Vin K, that code can be written as the following :</p>
	<p>BookId = dRow[&quot;BookId&quot;] as int?;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Vin K</title>
		<link>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-103143</link>
		<pubDate>Tue, 14 Aug 2007 07:46:25 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-103143</guid>
					<description>It could have been a good thing if the ?? operator worked with dbnull values returned from a database. These values are ussually checked prior to assigning to some variable

For example
If only i could do this

BookID = (int?)dRow[&amp;#34;bookid&amp;#34;] ?? null;

instead of this

if (dRow[&amp;#34;bookid&amp;#34;] != DBNull.Value)
{ BookID = (int?)dRow[&amp;#34;bookid&amp;#34;]; }
        else
{ BookID = null; }

I 'll put it on my next wishlist</description>
		<content:encoded><![CDATA[	<p>It could have been a good thing if the ?? operator worked with dbnull values returned from a database. These values are ussually checked prior to assigning to some variable</p>
	<p>For example<br />
If only i could do this</p>
	<p>BookID = (int?)dRow[&quot;bookid&quot;] ?? null;</p>
	<p>instead of this</p>
	<p>if (dRow[&quot;bookid&quot;] != DBNull.Value)<br />
{ BookID = (int?)dRow[&quot;bookid&quot;]; }<br />
        else<br />
{ BookID = null; }</p>
	<p>I &#8216;ll put it on my next wishlist
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mihir Solanki</title>
		<link>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-677</link>
		<pubDate>Fri, 17 Jun 2005 11:12:46 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-677</guid>
					<description>very usefull operator ... thanks for the tips</description>
		<content:encoded><![CDATA[	<p>very usefull operator &#8230; thanks for the tips
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Marcus Mac Innes</title>
		<link>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-608</link>
		<pubDate>Wed, 15 Jun 2005 12:56:58 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/06/15/doublequestionmark/#comment-608</guid>
					<description>Nice.</description>
		<content:encoded><![CDATA[	<p>Nice.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
