<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: C# Alias: &#8216;Using&#8217; Directive</title>
	<atom:link href="http://www.csharp411.com/c-alias/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/c-alias/</link>
	<description>C# Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:14:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: ZachBora</title>
		<link>http://www.csharp411.com/c-alias/#comment-25</link>
		<dc:creator>ZachBora</dc:creator>
		<pubDate>Wed, 17 Aug 2011 14:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-alias/#comment-25</guid>
		<description>You can also use it to define a scope outside of which the object is disposed.

using System;

class C : IDisposable
{
    public void UseLimitedResource()
    {
        Console.WriteLine(&quot;Using limited resource...&quot;);
    }

    void IDisposable.Dispose()
    {
        Console.WriteLine(&quot;Disposing limited resource.&quot;);
    }
}

class Program
{
    static void Main()
    {
        using (C c = new C())
        {
            c.UseLimitedResource();
        }
        Console.WriteLine(&quot;Now outside using statement.&quot;);
        Console.ReadLine();
    }
}</description>
		<content:encoded><![CDATA[<p>You can also use it to define a scope outside of which the object is disposed.</p>
<p>using System;</p>
<p>class C : IDisposable<br />
{<br />
    public void UseLimitedResource()<br />
    {<br />
        Console.WriteLine(&#8220;Using limited resource&#8230;&#8221;);<br />
    }</p>
<p>    void IDisposable.Dispose()<br />
    {<br />
        Console.WriteLine(&#8220;Disposing limited resource.&#8221;);<br />
    }<br />
}</p>
<p>class Program<br />
{<br />
    static void Main()<br />
    {<br />
        using (C c = new C())<br />
        {<br />
            c.UseLimitedResource();<br />
        }<br />
        Console.WriteLine(&#8220;Now outside using statement.&#8221;);<br />
        Console.ReadLine();<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

