<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>2,000 Things You Should Know About C#</title>
	<atom:link href="http://csharp.2000things.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://csharp.2000things.com</link>
	<description>Everything a C# Developer Needs to Know, in Bite-Sized Chunks</description>
	<lastBuildDate>Fri, 24 Feb 2012 11:01:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='csharp.2000things.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5021f502b3504edbf7e6bf53c55000e0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>2,000 Things You Should Know About C#</title>
		<link>http://csharp.2000things.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://csharp.2000things.com/osd.xml" title="2,000 Things You Should Know About C#" />
	<atom:link rel='hub' href='http://csharp.2000things.com/?pushpress=hub'/>
		<item>
		<title>#526 &#8211; Using Statements Can Alias Nested Namespaces</title>
		<link>http://csharp.2000things.com/2012/02/24/526-using-statements-can-alias-nested-namespaces/</link>
		<comments>http://csharp.2000things.com/2012/02/24/526-using-statements-can-alias-nested-namespaces/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 11:00:05 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespaces]]></category>
		<category><![CDATA[Using]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4437</guid>
		<description><![CDATA[If you have a type defined in a nested namespace, e.g. type DogLogger defined in the DogLibrary.Utility namespace, you can include a using statements that aliases the inner namespace. In the example below, we have two using statements.  One provides an alias for the outer DogLibrary namespace, so that you can use types from the DogLibrary namespace by just using the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4437&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have a type defined in a <a href="http://wp.me/pXTis-19s">nested namespace</a>, e.g. type <strong>DogLogger</strong> defined in the <strong>DogLibrary.Utility</strong> namespace, you can include a <strong>using </strong>statements that aliases the inner namespace.</p>
<p>In the example below, we have two <strong>using</strong> statements.  One provides an alias for the outer <strong>DogLibrary</strong> namespace, so that you can use types from the <strong>DogLibrary</strong> namespace by just using the type name.  The second aliases the <strong>DogLibrary.Utility</strong> namespace, so that you can use types defined in the inner namespace.</p>
<p><pre class="brush: csharp;">
using DogLibrary;
using DogLibrary.Utility;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            // DogLibrary.Dog
            Dog d = new Dog();

            // DogLibrary.Utility.DogLogger
            DogLogger logger = new DogLogger();
        }
    }
</pre></p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespaces/'>Namespaces</a>, <a href='http://csharp.2000things.com/tag/using/'>Using</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4437/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4437&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/24/526-using-statements-can-alias-nested-namespaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#525 &#8211; Namespaces Can Be Nested</title>
		<link>http://csharp.2000things.com/2012/02/23/525-namespaces-can-be-nested/</link>
		<comments>http://csharp.2000things.com/2012/02/23/525-namespaces-can-be-nested/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 11:00:18 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespaces]]></category>
		<category><![CDATA[Nested Namespaces]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4430</guid>
		<description><![CDATA[You can define a namespace at the top-level of a source file or you can define a namespace within another namespace.  When you define a namespace within another namespace, you can refer to the inner namespace using a dotted (outer.inner) syntax. In the example below, we have a Dog class defined within the top-level DogLibrary namespace. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4430&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can define a <a href="http://wp.me/pXTis-18R">namespace</a> at the top-level of a source file or you can define a namespace within another namespace.  When you define a namespace within another namespace, you can refer to the inner namespace using a dotted (<em>outer.inner</em>) syntax.</p>
<p>In the example below, we have a <strong>Dog</strong> class defined within the top-level <strong>DogLibrary</strong> namespace.  The full name for this type is <strong>DogLibrary.Dog</strong>.  We also define a <strong>Utility</strong> namespace within the <strong>DogLibrary</strong> namespace, and a <strong>DogLogger</strong> class whose full name is then <strong>DogLibrary.Utility.DogLogger</strong>.</p>
<p><pre class="brush: csharp;">
namespace DogLibrary
{
    public class Dog
    {
    }

    namespace Utility
    {
        public class DogLogger
        {
        }
    }
}
</pre></p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespaces/'>Namespaces</a>, <a href='http://csharp.2000things.com/tag/nested-namespaces/'>Nested Namespaces</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4430&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/23/525-namespaces-can-be-nested/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#524 &#8211; All Types Within a Namespace Must Be Unique</title>
		<link>http://csharp.2000things.com/2012/02/22/524-all-types-within-a-namespace-must-be-unique/</link>
		<comments>http://csharp.2000things.com/2012/02/22/524-all-types-within-a-namespace-must-be-unique/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 11:00:09 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespaces]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4423</guid>
		<description><![CDATA[You can create more than one type with the same name, as long as the exist in different namespaces.  But within a particular namespace, the name of every type must be unique. In the example below, we declare a Dog class in both the EarthDogs and AlienDogs namespaces. (In practice, for these classes, you&#8217;d probably instead declare a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4423&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can create more than one type with the same name, as long as the exist in different namespaces.  But within a particular namespace, the name of every type must be unique.</p>
<p>In the example below, we declare a <strong>Dog</strong> class in both the <strong>EarthDogs</strong> and <strong>AlienDogs</strong> namespaces.</p>
<p><pre class="brush: csharp;">
namespace EarthDogs
{
    public class Dog
    {
        public string Name { get; set; }

        public void Bark()
        {
            Console.WriteLine(&quot;Woooof&quot;);
        }
    }
}

namespace AlienDogs
{
    public class Dog
    {
        public string Name { get; set; }

        public void Bark()
        {
            Console.WriteLine(&quot;Snarkzuggrootzen&quot;);
        }
    }
}
</pre></p>
<p>(In practice, for these classes, you&#8217;d probably instead declare a <strong>Dog</strong> parent class and subclasses <strong>EarthDog</strong> and <strong>AlienDog</strong>, which would override the <strong>Bark</strong> method).</p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespaces/'>Namespaces</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4423/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4423&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/22/524-all-types-within-a-namespace-must-be-unique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>No Post Today</title>
		<link>http://csharp.2000things.com/2012/02/21/no-post-today/</link>
		<comments>http://csharp.2000things.com/2012/02/21/no-post-today/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 12:27:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4421</guid>
		<description><![CDATA[2,000 Things / C# is on hiatus today&#8211;back tomorrow. Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4421&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>2,000 Things / C# is on hiatus today&#8211;back tomorrow.</p>
<br />Filed under: <a href='http://csharp.2000things.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4421&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/21/no-post-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#523 &#8211; The using Directive Allows Omitting Namespace</title>
		<link>http://csharp.2000things.com/2012/02/20/523-the-using-directive-allows-omitting-namespace/</link>
		<comments>http://csharp.2000things.com/2012/02/20/523-the-using-directive-allows-omitting-namespace/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 11:00:43 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespace]]></category>
		<category><![CDATA[Using]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4413</guid>
		<description><![CDATA[A typical C# program will use types that are defined in a variety of namespaces.  Specifying the fully qualified type name that includes the namespace can become tedious. A using directive tells the compiler what namespaces to look for types in, avoiding the need for fully qualified type names. Assume that we have a Dog type, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4413&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A typical C# program will use types that are defined in a variety of <a href="http://csharp.2000things.com/2012/02/16/521-namespaces-help-organize-types/">namespaces</a>.  Specifying the <a href="http://csharp.2000things.com/2012/02/17/522-the-fully-qualified-name-for-a-type-includes-the-namespace/">fully qualified type name</a> that includes the namespace can become tedious.</p>
<p>A <strong>using</strong> directive tells the compiler what namespaces to look for types in, avoiding the need for fully qualified type names.</p>
<p>Assume that we have a <strong>Dog</strong> type, defined in the <strong>DogLibrary</strong> namespace.  The fully qualified type name is <strong>DogLibrary.Dog</strong>.  But in the code fragment below, we can just use <strong>Dog</strong> as the type name, because of the <strong>using</strong> directive.</p>
<p><pre class="brush: csharp;">
using DogLibrary;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            Dog kirby = new Dog();
            kirby.Bark();
        }
    }
}
</pre></p>
<p>So you can use a type name without its namespace if:</p>
<ul>
<li>The type is defined in the same namespace as the current code</li>
<li>A <strong>using</strong> directive for the type&#8217;s namespace is present</li>
</ul>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespace/'>Namespace</a>, <a href='http://csharp.2000things.com/tag/using/'>Using</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4413&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/20/523-the-using-directive-allows-omitting-namespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#522 &#8211; The Fully Qualified Name for a Type Includes the Namespace</title>
		<link>http://csharp.2000things.com/2012/02/17/522-the-fully-qualified-name-for-a-type-includes-the-namespace/</link>
		<comments>http://csharp.2000things.com/2012/02/17/522-the-fully-qualified-name-for-a-type-includes-the-namespace/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 11:00:05 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespaces]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4405</guid>
		<description><![CDATA[If we define a Dog type in the DogLibrary namespace, the fully qualified name for the new type is DogLibrary.Dog.  You can use this full name when working with the type. If you&#8217;re writing code that exists in the same namespace as a type, you can omit the namespace and just use the short version of the type name. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4405&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If we define a <strong>Dog</strong> type in the <strong>DogLibrary</strong> <a href="http://csharp.2000things.com/2012/02/16/521-namespaces-help-organize-types/">namespace</a>, the fully qualified name for the new type is <strong>DogLibrary.Dog</strong>.  You can use this full name when working with the type.</p>
<p><pre class="brush: csharp;">
            DogLibrary.Dog kirby = new DogLibrary.Dog();
            kirby.Bark();
</pre></p>
<p>If you&#8217;re writing code that exists in the <em>same namespace</em> as a type, you can omit the namespace and just use the short version of the type name.</p>
<p><pre class="brush: csharp;">
namespace DogLibrary
{
    public class Dog
    {
        public string Name { get; set; }
        public int Age { get; set; }

        public void Bark()
        {
            Console.WriteLine(&quot;WOOOOOF!&quot;);
        }
    }

    public static class DogFactory
    {
        public static Dog MakeDog(string name, int age)
        {
            // Can just use &quot;Dog&quot; as type name
            Dog d = new Dog();
            d.Name = name;
            d.Age = age;
            return d;
        }
    }
}
</pre></p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespaces/'>Namespaces</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4405/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4405&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/17/522-the-fully-qualified-name-for-a-type-includes-the-namespace/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#521 &#8211; Namespaces Help Organize Types</title>
		<link>http://csharp.2000things.com/2012/02/16/521-namespaces-help-organize-types/</link>
		<comments>http://csharp.2000things.com/2012/02/16/521-namespaces-help-organize-types/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 11:00:18 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Namespace]]></category>
		<category><![CDATA[Namespaces]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4393</guid>
		<description><![CDATA[In C#, a namespace is a collection of related types.  The fully qualified name of every type actually includes the namespace that it&#8217;s defined in. You use the namespace keyword to define a namespace.  All types defined within the pair of braces that follow the namespace name then belong to that namespace. In the example below, the Dog [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4393&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In C#, a <em>namespace</em> is a collection of related types.  The fully qualified name of every type actually includes the namespace that it&#8217;s defined in.</p>
<p>You use the <strong>namespace</strong> keyword to define a namespace.  All types defined within the pair of braces that follow the namespace name then belong to that namespace.</p>
<p>In the example below, the <strong>Dog</strong> class belongs to the <strong>DogLibrary</strong> namespace.</p>
<p><pre class="brush: csharp;">
namespace DogLibrary
{
    public class Dog
    {
        public string Name { get; set; }
        public int Age { get; set; }

        public void Bark()
        {
            Console.WriteLine(&quot;WOOOOOF!&quot;);
        }
    }
}
</pre></p>
<p>Because <strong>Dog</strong> is defined within the <strong>DogLibrary</strong> namespace, the fully qualifed name of the <strong>Dog</strong> type is <strong>DogLibrary.Dog</strong>.</p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a> Tagged: <a href='http://csharp.2000things.com/tag/basics/'>Basics</a>, <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/namespace/'>Namespace</a>, <a href='http://csharp.2000things.com/tag/namespaces/'>Namespaces</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4393/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4393/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4393/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4393&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/16/521-namespaces-help-organize-types/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#520 &#8211; Choosing Between a struct and a Class</title>
		<link>http://csharp.2000things.com/2012/02/15/520-choosing-between-a-struct-and-a-class/</link>
		<comments>http://csharp.2000things.com/2012/02/15/520-choosing-between-a-struct-and-a-class/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 11:00:39 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Data Types]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[struct]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4387</guid>
		<description><![CDATA[A struct and a class both encapsulate data and methods in a new type.  When you are creating a new type, you&#8217;ll generally create a new class.  But there are cases when a struct is the better choice. Create a struct, rather than a class, when all of the following is true: You want value type semantics, that is&#8211;a variable of this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4387&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A <strong>struct</strong> and a <strong>class</strong> both encapsulate data and methods in a new type.  When you are creating a new type, you&#8217;ll generally create a new <strong>class</strong>.  But there are cases when a <strong>struct</strong> is the better choice.</p>
<p>Create a <strong>struct</strong>, rather than a <strong>class</strong>, when all of the following is true:</p>
<ul>
<li>You want value type <em>semantics</em>, that is&#8211;a variable of this type directly contains the data and a copy is made whenever you assign the value to a new variable or pass the variable to a method</li>
<li>Data stored in the <strong>struct</strong> won&#8217;t be modified after an instance is created or does not change very often</li>
<li>You don&#8217;t need to inherit from another type (a <strong>struct</strong> inherits only from <strong>System.ValueType</strong>)</li>
<li>You need to store only a small amount of data in the type</li>
</ul>
<br />Filed under: <a href='http://csharp.2000things.com/category/data-types/'>Data Types</a> Tagged: <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/class/'>Class</a>, <a href='http://csharp.2000things.com/tag/data-types/'>Data Types</a>, <a href='http://csharp.2000things.com/tag/struct/'>struct</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4387/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4387&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/15/520-choosing-between-a-struct-and-a-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#519 &#8211; Differences Between structs and classes</title>
		<link>http://csharp.2000things.com/2012/02/14/519-differences-between-structs-and-classes/</link>
		<comments>http://csharp.2000things.com/2012/02/14/519-differences-between-structs-and-classes/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 11:00:14 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Data Types]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[struct]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4377</guid>
		<description><![CDATA[There are a number of differences between a struct and a class, including: A struct is a value type (instance created on the stack); a class is a reference type (instance created on the heap) A variable defined as a struct type contains the actual data in the struct; a variable defined as a class type references or points to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4377&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are a number of differences between a <strong><a href="http://csharp.2000things.com/2010/10/02/107-defining-and-using-a-struct/">struct</a></strong> and a <strong><a href="http://csharp.2000things.com/2011/01/29/226-classes-and-objects/">class</a></strong>, including:</p>
<ul>
<li>A <strong>struct</strong> is a <em>value type </em>(instance created on the stack);<em><strong> </strong></em>a <strong>class</strong> is a <em>reference type </em>(instance created on the heap)</li>
<li>A variable defined as a <strong>struct</strong> type contains the actual data in the <strong>struct</strong>; a variable defined as a <strong>class</strong> type references or points to the data stored in the instance of the class</li>
<li>Memory for a <strong>struct</strong> is released when its variable goes out of scope; memory for a <strong>class</strong> instance is released when the object is garbage collected</li>
<li>When a <strong>struct</strong> is assigned to a new variable, a copy is made (changes to the original are not reflected in the copy); when an instance of a <strong>class</strong> is assigned to a new variable, the new variable references the existing instance</li>
<li>When a <strong>struct</strong> is passed to a method, a copy is made</li>
</ul>
<br />Filed under: <a href='http://csharp.2000things.com/category/data-types/'>Data Types</a> Tagged: <a href='http://csharp.2000things.com/tag/c/'>C#</a>, <a href='http://csharp.2000things.com/tag/class/'>Class</a>, <a href='http://csharp.2000things.com/tag/data-types/'>Data Types</a>, <a href='http://csharp.2000things.com/tag/struct/'>struct</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4377/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4377&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/14/519-differences-between-structs-and-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>#518 &#8211; Splitting the Implementation of a Class Across Multiple Files</title>
		<link>http://csharp.2000things.com/2012/02/13/518-splitting-the-implementation-of-a-class-across-multiple-files/</link>
		<comments>http://csharp.2000things.com/2012/02/13/518-splitting-the-implementation-of-a-class-across-multiple-files/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 11:00:28 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Basics]]></category>

		<guid isPermaLink="false">http://csharp.2000things.com/?p=4366</guid>
		<description><![CDATA[It is sometimes convenient to split the source code for a class across more than one source file.  You can do this using the partial keyword. In the example below, we split the implementation of the Dog class between Dog.cs and Dog-IBark.cs.  The latter file contains the implementation of the IBark interface.  The class definition in both files is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4366&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is sometimes convenient to split the source code for a class across more than one source file.  You can do this using the <strong>partial</strong> keyword.</p>
<p>In the example below, we split the implementation of the <strong>Dog</strong> class between <strong>Dog.cs</strong> and <strong>Dog-IBark.cs</strong>.  The latter file contains the implementation of the <strong>IBark</strong> interface.  The class definition in both files is marked with the <strong>partial</strong> keyword.</p>
<p><pre class="brush: csharp;">
    // Dog.cs
    public partial class Dog
    {
        public string Name { get; set; }
        public int Age { get; set; }

        /// &lt;summary&gt;
        /// Create new Dog with specified name
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;name&quot;&gt;&lt;/param&gt;
        public Dog(string name, int age)
        {
            Name = name;
            Age = age;
        }
    }
</pre></p>
<p>&nbsp;</p>
<p><pre class="brush: csharp;">
    partial class Dog : IBark
    {
        public bool CanBark { get; set; }

        public void Bark()
        {
            Console.WriteLine(&quot;WOOOOOF!&quot;);
        }
    }
</pre></p>
<p>Notice that we don&#8217;t specify <strong>IBark</strong> inheritance in the first file, because it does not implement any <strong>IBark</strong> methods.</p>
<br />Filed under: <a href='http://csharp.2000things.com/category/basics/'>Basics</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/2000thingscsharp.wordpress.com/4366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/2000thingscsharp.wordpress.com/4366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/2000thingscsharp.wordpress.com/4366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharp.2000things.com&amp;blog=14273916&amp;post=4366&amp;subd=2000thingscsharp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharp.2000things.com/2012/02/13/518-splitting-the-implementation-of-a-class-across-multiple-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
	</channel>
</rss>
