<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FailBoy &#187; rant</title>
	<atom:link href="http://www.failboy.net/tag/rant/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.failboy.net</link>
	<description>We reserve the right FAIL</description>
	<lastBuildDate>Thu, 26 Nov 2009 06:29:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>C# has an ISNULL function, its called ??</title>
		<link>http://www.failboy.net/2009/10/c-has-an-isnull-function-its-called/</link>
		<comments>http://www.failboy.net/2009/10/c-has-an-isnull-function-its-called/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 08:13:27 +0000</pubDate>
		<dc:creator>FailBoy</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[??]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ISNULL]]></category>
		<category><![CDATA[operators]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://www.failboy.net/?p=48</guid>
		<description><![CDATA[Just a very short and quick post. For a while now .Net has had nullable types. Take for example an integer, instead of declaring it as: int x = 0; you declare it as: int? x = 0; Now in coding examples all over the web I&#8217;m seeing the same logic and its driving me [...]]]></description>
			<content:encoded><![CDATA[<p>Just a very short and quick post. For a while now .Net has had nullable types. Take for example an integer, instead of declaring it as:</p>
<pre class="brush: csharp;">int x = 0;</pre>
<p>you declare it as: </p>
<pre class="brush: csharp;">int? x = 0;</pre>
<p>Now in coding examples all over the web I&#8217;m seeing the same logic and its driving me nuts!</p>
<pre class="brush: csharp;">if(x == null){
    x = -1;
}</pre>
<p>There is a much shorter route and that is:</p>
<pre class="brush: csharp;">x = x ?? -1;</pre>
<p>The &#8220;??&#8221; operator works exactly the same way an ISNULL function call works in SQL. It evaluates the variable on the left of the operator to ensure its not null (or undefined as some people call it), and if it is, it uses the value on the right of the ?? operator. Quick and easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.failboy.net/2009/10/c-has-an-isnull-function-its-called/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
