<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Thu, 20 Jun 2013 05:38:53 GMT</pubDate>
	<lastBuildDate>Thu, 20 Jun 2013 05:38:53 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>60</c9:totalResults>
	<c9:pageCount>-60</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Hi <br><br>I know how to use both Abstract class and interface in C#<br><br>but i just want to know the what is the problem in using Abstract in place of interface and viceversa.<br><br>I know the coding part but wanted to know the problem in using the above in the wrong place.</p><p>Any could you please explain me the above with scenarios..</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c8ba94b86db645d7befd9fdd012f94ce#c8ba94b86db645d7befd9fdd012f94ce</link>
		<pubDate>Thu, 19 Jan 2012 18:25:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c8ba94b86db645d7befd9fdd012f94ce#c8ba94b86db645d7befd9fdd012f94ce</guid>
		<dc:creator>Surendiran Balasubramanian</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Surendiran Bala/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Abstract classes have default implementations for one or more methods, interfaces don't have any default implementations. Simple.</p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6578c13f16784a4597659fdd013052a6#6578c13f16784a4597659fdd013052a6</link>
		<pubDate>Thu, 19 Jan 2012 18:28:00 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6578c13f16784a4597659fdd013052a6#6578c13f16784a4597659fdd013052a6</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c6578c13f16784a4597659fdd013052a6">Dr Herbie</a>: Sorry, that's not correct, nor does it explain why to use one over the other.</p><p><pre class="brush: csharp">public abstract class Foo
{
   public abstract void Bar();
}</pre></p><p>There's no default implementation for any method to be found in that example.</p><p>The truth is, if we had multiple inheritance there would be no reason to use interfaces. But we don't. So, in general it's best to define an interface first. Then you might want to provide an abstract class to help with implementing the interface.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6c1ab8e9d8e84230b1209fdd01365ab8#6c1ab8e9d8e84230b1209fdd01365ab8</link>
		<pubDate>Thu, 19 Jan 2012 18:49:57 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6c1ab8e9d8e84230b1209fdd01365ab8#6c1ab8e9d8e84230b1209fdd01365ab8</guid>
		<dc:creator>William Kempf</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/wkempf/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Think of an interface as a pure abstract class. Whether you use one or the other is a choice that you must make at design time.</p><p>I usually use abstract classes if I have a default implementation of one or more methods. If not, I'll stick with an interface.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/cf02467f391e400ba8e79fdd0146f78c#cf02467f391e400ba8e79fdd0146f78c</link>
		<pubDate>Thu, 19 Jan 2012 19:50:27 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/cf02467f391e400ba8e79fdd0146f78c#cf02467f391e400ba8e79fdd0146f78c</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#ccf02467f391e400ba8e79fdd0146f78c">spivonious</a>: You can't ignore the elephant in the room. You can implement multiple interfaces, you can inherit only one class (abstract or not).</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/5ca07510bb5b4a45a5fb9fdd0148d266#5ca07510bb5b4a45a5fb9fdd0148d266</link>
		<pubDate>Thu, 19 Jan 2012 19:57:12 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/5ca07510bb5b4a45a5fb9fdd0148d266#5ca07510bb5b4a45a5fb9fdd0148d266</guid>
		<dc:creator>William Kempf</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/wkempf/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Interesting question because I didn't think C# supports Abstract Classes until now. Does this feature requires certain .NET version and above?</p><p>I did a quick Bing learning and here is a simple article.</p><p><a href="http://www.techotopia.com/index.php/Understanding_C_Sharp_Abstract_Classes">http://www.techotopia.com/index.php/Understanding_C_Sharp_Abstract_Classes</a></p><p>I am pretty sure you cannot use virtual method in an interface, which sets apart from abstract class.</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/8bc31bfd20c64f5d90bd9fdd014aa85a#8bc31bfd20c64f5d90bd9fdd014aa85a</link>
		<pubDate>Thu, 19 Jan 2012 20:03:53 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/8bc31bfd20c64f5d90bd9fdd014aa85a#8bc31bfd20c64f5d90bd9fdd014aa85a</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>ahhhh, now I see what's going on, you still cannot inherit multiple abstract classes, it is not C&#43;&#43;.</p><p>Here is a quick comparison</p><p><a href="http://en.csharp-online.net/Should_I_use_an_abstract_class_or_an_interface%3F">http://en.csharp-online.net/Should_I_use_an_abstract_class_or_an_interface%3F</a></p><p>Meaning, if you want multiple inheritance, interface only. C# is still single inheritance where abstract class cannot be instantiated.</p><p>Pros on abstract, versioning, read the link. Cons, single inheritance obviously.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/59785dd09a6349e4a7499fdd014e60bb#59785dd09a6349e4a7499fdd014e60bb</link>
		<pubDate>Thu, 19 Jan 2012 20:17:25 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/59785dd09a6349e4a7499fdd014e60bb#59785dd09a6349e4a7499fdd014e60bb</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/8bc31bfd20c64f5d90bd9fdd014aa85a">20 minutes&nbsp;ago</a>, <a href="/Niners/magicalclick">magicalclick</a> wrote</p><p>I am pretty sure you cannot use virtual method in an interface, which sets apart from abstract class.</p><p></p></div></blockquote><p></p><p>All methods in a interface are virtual.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b45bba8533ff4f65b9f69fdd01507c55#b45bba8533ff4f65b9f69fdd01507c55</link>
		<pubDate>Thu, 19 Jan 2012 20:25:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b45bba8533ff4f65b9f69fdd01507c55#b45bba8533ff4f65b9f69fdd01507c55</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cb45bba8533ff4f65b9f69fdd01507c55">Richard.Hein</a>: *sigh* No, no methods on an interface are virtual. The terms &quot;virtual&quot; and &quot;abstract&quot; apply only to classes. For that matter, @magicalclick is just as wrong when he says &quot;if you want multiple inheritance, interface only&quot;, because you don't inherit interfaces. You implement them. Right now I may sound like a grammar *, but most of the confusion surrounding these topics comes from incorrect usage of terms such as these.</p><p>The fact that methods/properties on an interface aren't virtual/abstract is important to note because if they were you'd be able to override them when you inherit from a class that implements the interface. You can't, unless the implementation declares the method/property to be virtual/abstract.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f7791a2cbe4c424e9cc69fdd0153877a#f7791a2cbe4c424e9cc69fdd0153877a</link>
		<pubDate>Thu, 19 Jan 2012 20:36:11 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f7791a2cbe4c424e9cc69fdd0153877a#f7791a2cbe4c424e9cc69fdd0153877a</guid>
		<dc:creator>William Kempf</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/wkempf/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/5ca07510bb5b4a45a5fb9fdd0148d266">1 hour&nbsp;ago</a>, <a href="/Niners/wkempf">wkempf</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#ccf02467f391e400ba8e79fdd0146f78c">spivonious</a>: You can't ignore the elephant in the room. You can implement multiple interfaces, you can inherit only one class (abstract or not).</p><p></p></div></blockquote><p></p><p>True, but that's not a rule across platforms. C&#43;&#43; lets you do it, for example. .NET and Java don't.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d8b5606c1cfc46d697329fdd015e190c#d8b5606c1cfc46d697329fdd015e190c</link>
		<pubDate>Thu, 19 Jan 2012 21:14:40 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d8b5606c1cfc46d697329fdd015e190c#d8b5606c1cfc46d697329fdd015e190c</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f7791a2cbe4c424e9cc69fdd0153877a">1 hour&nbsp;ago</a>, <a href="/Niners/wkempf">wkempf</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cb45bba8533ff4f65b9f69fdd01507c55">Richard.Hein</a>: *sigh* No, no methods on an interface are virtual. The terms &quot;virtual&quot; and &quot;abstract&quot; apply only to classes. For that matter, @magicalclick is just as wrong when he says &quot;if you want multiple inheritance, interface only&quot;, because you don't inherit interfaces. You implement them. Right now I may sound like a grammar *, but most of the confusion surrounding these topics comes from incorrect usage of terms such as these.</p><p>The fact that methods/properties on an interface aren't virtual/abstract is important to note because if they were you'd be able to override them when you inherit from a class that implements the interface. You can't, unless the implementation declares the method/property to be virtual/abstract.</p><p></p></div></blockquote><p></p><p>Hmm ...</p><pre><span>interface</span>&nbsp;<span>IFoo</span>{&nbsp;&nbsp;&nbsp;&nbsp;<span>void</span>&nbsp;Bar();}</pre><p>ILDASM:</p><p>.method public hidebysig newslot abstract <strong>virtual</strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance void&nbsp; Bar() cil managed</p><p>{</p><p>} // end of method IFoo::Bar</p><p>Abstract and virtual.&nbsp; Well, you made me doubt myself enough to check.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6a76f8995e85449a95259fdd016e8a95#6a76f8995e85449a95259fdd016e8a95</link>
		<pubDate>Thu, 19 Jan 2012 22:14:32 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6a76f8995e85449a95259fdd016e8a95#6a76f8995e85449a95259fdd016e8a95</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cc8ba94b86db645d7befd9fdd012f94ce">Surendiran Bala</a>: Dare i say that if you aren't sure, you should probably be using an Interface as it's usually the better option.</p><p>Abstract classes are something of a more pure OOP ideal and fit better with a design that heavily leverages polymorphism, but such designs tend to be over-architected and unnecessary. By contrast Interfaces are a much looser concept that is a little less purist from an OO perspective but generally lends itself to less complex and more flexible designs.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/63aaf82d636b402ba0a29fdd0176bf8d#63aaf82d636b402ba0a29fdd0176bf8d</link>
		<pubDate>Thu, 19 Jan 2012 22:44:24 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/63aaf82d636b402ba0a29fdd0176bf8d#63aaf82d636b402ba0a29fdd0176bf8d</guid>
		<dc:creator>AndyC</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AndyC/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>The main difference is that if you use an abstract class and then write generalized code against that abstract class, you're forcing all concrete instances to belong to single hierarchical lineage of class.</p><p>If you generalize to an interface, you're writing code that does not enforce a single class hierarchy or any class hierarchy for that matter.</p><p>Since abstract classes and interfaces aren't mutually exclusive, you can use both. Use an interface to enforce consistency of method signatures and then abstract classes to enforce a particular lineage of class hierarchy.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/561521cff9af4f9c92779fde000e0841#561521cff9af4f9c92779fde000e0841</link>
		<pubDate>Fri, 20 Jan 2012 00:51:05 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/561521cff9af4f9c92779fde000e0841#561521cff9af4f9c92779fde000e0841</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6c1ab8e9d8e84230b1209fdd01365ab8">11 hours&nbsp;ago</a>, <a href="/Niners/wkempf">wkempf</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c6578c13f16784a4597659fdd013052a6">Dr Herbie</a>: Sorry, that's not correct, nor does it explain why to use one over the other.</p><div class="syntaxhighlighterHolder"><div id="highlighter_569142" class="syntaxhighlighter csharp"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">abstract</code> <code class="csharp keyword">class</code> <code class="csharp plain">Foo</code></div><div class="line number2 index1 alt1"><code class="csharp plain">{</code></div><div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">abstract</code> <code class="csharp keyword">void</code> <code class="csharp plain">Bar();</code></div><div class="line number4 index3 alt1"><code class="csharp plain">}</code></div></div></td></tr></tbody></table></div></div><p>There's no default implementation for any method to be found in that example.</p><p></p></div></blockquote><p></p><p>But what is the purpose of code like that? &nbsp;Why would you make it abstract and not an interface?</p><p>If I saw that in live code I would change it to an interface.</p><p>&nbsp;</p><p>I get what you mean about multiple inheritance. In C&#43;&#43; I would have used a pure abstract class with no implementation instead of an interface because I never liked to use multiple inheritance with real implementations in the base class. I was so glad that C# didn't allow it.</p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/a7ccd596a419434780659fde00688a8b#a7ccd596a419434780659fde00688a8b</link>
		<pubDate>Fri, 20 Jan 2012 06:20:37 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/a7ccd596a419434780659fde00688a8b#a7ccd596a419434780659fde00688a8b</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>As I said earlier, there could be a reason why you'd use one or the other or even both. Here's a really silly example of how you'd use both an interface and an abstract class.</p><p><pre class="brush: csharp">class Program
{
    private interface IVehicle
    {
        void Move();
    }

    private abstract class Car : IVehicle
    {
        public abstract void Move();

        protected void Drive(string name)
        {
            Console.WriteLine(&quot;Drive &quot; &#43; name);
        }
    }

    private class Toyota : Car
    {
        public override void Move()
        {
            Drive(&quot;Toyota&quot;);
        }
    }

    private class Ford : Car
    {
        public override void Move()
        {
            Drive(&quot;Ford&quot;);
        }
    }

    private abstract class Bicycle : IVehicle
    {
        public abstract void Move();

        protected void Peddle(string name)
        {
            Console.WriteLine(&quot;Peddle &quot; &#43; name);
        }
    }

    private class Cannondale : Bicycle
    {
        public override void Move()
        {
            Peddle(&quot;Cannondale&quot;);
        }
    }

    private class Bianchi : Bicycle
    {
        public override void Move()
        {
            Peddle(&quot;Bianchi&quot;);
        }
    }

    private static void MoveDownStreet(List&lt;IVehicle&gt; vehicles)
    {
        Console.WriteLine(String.Empty);
        Console.WriteLine(&quot;Move IVehicles down the street&quot;);
        vehicles.ForEach(v =&gt; v.Move());
    }

    private static void MoveDownLeftLane(List&lt;Car&gt; cars)
    {
        Console.WriteLine(String.Empty);
        Console.WriteLine(&quot;Move Cars down left lane&quot;);
        cars.ForEach(c =&gt; c.Move());
    }

    private static void MoveDownBikeLane(List&lt;Bicycle&gt; bikes)
    {
        Console.WriteLine(String.Empty);
        Console.WriteLine(&quot;Move Bicycles down bike lane&quot;);
        bikes.ForEach(b =&gt; b.Move());
    }

    static void Main(string[] args)
    {
        var allvehicles = new List&lt;IVehicle&gt;();
        allvehicles.Add(new Toyota());
        allvehicles.Add(new Ford());
        allvehicles.Add(new Cannondale());
        allvehicles.Add(new Bianchi());

        MoveDownStreet(allvehicles);
        MoveDownLeftLane(allvehicles.Where(v =&gt; v.GetType().BaseType == typeof(Car)).Cast&lt;Car&gt;().ToList());
        MoveDownBikeLane(allvehicles.Where(v =&gt; v.GetType().BaseType == typeof(Bicycle)).Cast&lt;Bicycle&gt;().ToList());
    }
}</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/645584d3002847bd8a659fde007bb43e#645584d3002847bd8a659fde007bb43e</link>
		<pubDate>Fri, 20 Jan 2012 07:30:23 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/645584d3002847bd8a659fde007bb43e#645584d3002847bd8a659fde007bb43e</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Note that in my example above, the declaration of Move() as an abstract method in both the Car and Bicycle abstract classes count as an implementation as far as IVehicle is concerned. Yet, they are still not implemented as concrete methods as far as the abstract classes are concerned.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/16934a612ee74496a7c49fde007dd6d0#16934a612ee74496a7c49fde007dd6d0</link>
		<pubDate>Fri, 20 Jan 2012 07:38:09 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/16934a612ee74496a7c49fde007dd6d0#16934a612ee74496a7c49fde007dd6d0</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c16934a612ee74496a7c49fde007dd6d0">cbae</a>: That's a really hideous mix of interfaces and abstract classes though.</p><p>From a pure OO perspective an abstract class represents an &quot;is a&quot; relationship wheras an interface is more of a &quot;can behave like a&quot; relationship.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7ccc17b8aa7e4f6eb6419fde00963edd#7ccc17b8aa7e4f6eb6419fde00963edd</link>
		<pubDate>Fri, 20 Jan 2012 09:07:01 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7ccc17b8aa7e4f6eb6419fde00963edd#7ccc17b8aa7e4f6eb6419fde00963edd</guid>
		<dc:creator>AndyC</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AndyC/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c7ccc17b8aa7e4f6eb6419fde00963edd">AndyC</a>: &nbsp;I go with your definition of an abstract class as being closer to an 'is a' relationship.</p><p>Whereas&nbsp;I tend to think of interfaces as 'shapes'. &nbsp;Any instance that has that 'shape' can be used by code that is coded against the 'shape' of the interface (the I in SOLID).</p><p>So is an abstract class is 'is a', then an interface is a 'looks like a' <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-4.gif?v=c9' alt='Tongue Out' /></p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/42f46efe616746398b429fde009a652c#42f46efe616746398b429fde009a652c</link>
		<pubDate>Fri, 20 Jan 2012 09:22:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/42f46efe616746398b429fde009a652c#42f46efe616746398b429fde009a652c</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c42f46efe616746398b429fde009a652c">Dr Herbie</a>: Yep, that's probably a better way of wording it. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f113fcde9148442dacad9fde00a87466#f113fcde9148442dacad9fde00a87466</link>
		<pubDate>Fri, 20 Jan 2012 10:13:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f113fcde9148442dacad9fde00a87466#f113fcde9148442dacad9fde00a87466</guid>
		<dc:creator>AndyC</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AndyC/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>That's what I learned: classes (abstract or otherwise) are &quot;is a&quot;, while interfaces are &quot;can do&quot;.</p><p>Interfaces describe a behaviour, rather than what the thing is. To use the age-old drawing example, you would have an (abstract) base class &quot;Shape&quot; (because that's what circles and triangles and whatever are), but if you were to create an interface it'd be something like &quot;IDrawable&quot; because that's what they can do: they are things that can be drawn. You could even have an abstract&nbsp;Shape class that implements the IDrawable interface (but leaves its concrete implementation up to the derived classes).</p><p>It's not a coincidence that so many of the .Net BCL interfaces have names ending in &quot;able&quot;. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/48ddf5cf3ee5418a866d9fde00b30a34#48ddf5cf3ee5418a866d9fde00b30a34</link>
		<pubDate>Fri, 20 Jan 2012 10:51:51 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/48ddf5cf3ee5418a866d9fde00b30a34#48ddf5cf3ee5418a866d9fde00b30a34</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c48ddf5cf3ee5418a866d9fde00b30a34">Sven Groot</a>: It always seemed to me that the use of interfaces in that manner was closer to AOP than OOP.</p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/549693489c7248deb1e99fde00e3777b#549693489c7248deb1e99fde00e3777b</link>
		<pubDate>Fri, 20 Jan 2012 13:48:10 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/549693489c7248deb1e99fde00e3777b#549693489c7248deb1e99fde00e3777b</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7ccc17b8aa7e4f6eb6419fde00963edd">4 hours&nbsp;ago</a>, <a href="/Niners/AndyC">AndyC</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c16934a612ee74496a7c49fde007dd6d0">cbae</a>: That's a really hideous mix of interfaces and abstract classes though.</p><p>From a pure OO perspective an abstract class represents an &quot;is a&quot; relationship wheras an interface is more of a &quot;can behave like a&quot; relationship.</p><p></p></div></blockquote><p></p><p>No sh1t, genius. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /> I wrote that code specifically to show that the two mechanisms aren't mutually exclusive. It also showed the two different purposes of one vs. other. Continuing with Sven's point, in my &quot;hideous&quot; example, the interface is used for when your only concern is whether or not an object &quot;can do&quot; (i.e. that the object can &quot;move down the street&quot;) without any concern for WHAT IT IS. The abstract class was used for when you are concerned about what it is (i.e. only cars can travel down the left lane and only bicycles can travel down the bike lane). So I would say Sven is absolutely correct.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/a2316b4469234442aa899fde00eb166d#a2316b4469234442aa899fde00eb166d</link>
		<pubDate>Fri, 20 Jan 2012 14:15:55 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/a2316b4469234442aa899fde00eb166d#a2316b4469234442aa899fde00eb166d</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Interface -&gt; value type</p><p>Abstract class -&gt; reference type</p><p>Use abstract classes when you are creating a framework (wpf or something).</p><p>Use interfaces when creating large applications wich require dependency injection.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7fb45747b1d740208aba9fde00fe53d4#7fb45747b1d740208aba9fde00fe53d4</link>
		<pubDate>Fri, 20 Jan 2012 15:25:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7fb45747b1d740208aba9fde00fe53d4#7fb45747b1d740208aba9fde00fe53d4</guid>
		<dc:creator>Maddus Mattus</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Maddus Mattus/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Guys instead of same discussion over and over..it would be better if some one write a sample why we should not use interface in place of abstract class vice versa....like problem in using the interface and abstract in wrong design...that would put full stop for all the doubts.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/8415f1d38f1b47a19dfa9fde0102c896#8415f1d38f1b47a19dfa9fde0102c896</link>
		<pubDate>Fri, 20 Jan 2012 15:42:12 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/8415f1d38f1b47a19dfa9fde0102c896#8415f1d38f1b47a19dfa9fde0102c896</guid>
		<dc:creator>Surendiran Balasubramanian</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Surendiran Bala/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7fb45747b1d740208aba9fde00fe53d4">17 minutes&nbsp;ago</a>, <a href="/Niners/Maddus%20Mattus">Maddus&nbsp;Mattus</a> wrote</p><p>Interface -&gt; value type</p></div></blockquote><p></p><p>I'm not entirely sure if you're trying for an analogy or if you're being literal here, but in case of the latter, you're wrong. Interfaces are not inherently tied to either reference or value types (both can implement an interface), but they're mostly treated like reference types. For instance, if you cast a variable of a value type to an interface type, it will be boxed.</p><p>@Surendiran: the problem is that there is no definite example of that. As with most things related to design, the answer is &quot;it depends&quot; most of the time.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/22e134a4641f40fdbcc49fde0103c265#22e134a4641f40fdbcc49fde0103c265</link>
		<pubDate>Fri, 20 Jan 2012 15:45:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/22e134a4641f40fdbcc49fde0103c265#22e134a4641f40fdbcc49fde0103c265</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c22e134a4641f40fdbcc49fde0103c265">Sven Groot</a>: Ok, let me rephrase. They are more lightweight then abstract classes.</p><p>On the boundry of systems you should use interfaces, as they act as contracts. Abstract classes are less suitable for these tasks, because they may have logic or dependencies on the system. A interface is a clean cut, where abstract classes may still have ties. In the system itself, when it adds value you can use abstract classes.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/00f16b37bacb41c49c0a9fde01068252#00f16b37bacb41c49c0a9fde01068252</link>
		<pubDate>Fri, 20 Jan 2012 15:55:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/00f16b37bacb41c49c0a9fde01068252#00f16b37bacb41c49c0a9fde01068252</guid>
		<dc:creator>Maddus Mattus</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Maddus Mattus/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Some one please explain change in Interface in API design or shipped assebly will create problem...but when you use abstract class it wont give any problem...</p><p>I am taking a training and i have to give some real time example...please help</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b2c3713afde443bea3a59fde011ecbe4#b2c3713afde443bea3a59fde011ecbe4</link>
		<pubDate>Fri, 20 Jan 2012 17:24:11 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b2c3713afde443bea3a59fde011ecbe4#b2c3713afde443bea3a59fde011ecbe4</guid>
		<dc:creator>Surendiran Balasubramanian</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Surendiran Bala/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>don't forget the covariant return types and type variance specifiers, which are only supported by interfaces<br><br>another&nbsp;usefulness&nbsp;of interfaces, coming in due to single-inheritance constraints, is deep hierarchies of generic types, when one type does know how to provide the generic arguments for another in a closely looped machinery, non generic interfaces can help</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/e8bed8df737342f8a7799fde0131ef52#e8bed8df737342f8a7799fde0131ef52</link>
		<pubDate>Fri, 20 Jan 2012 18:33:52 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/e8bed8df737342f8a7799fde0131ef52#e8bed8df737342f8a7799fde0131ef52</guid>
		<dc:creator>Ion Todirel</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Ion Todirel/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#ce8bed8df737342f8a7799fde0131ef52">Ion Todirel</a>: You lost me at covariant <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-4.gif?v=c9' alt='Tongue Out' /></p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/3558fe23c35943cda7f99fde013557fe#3558fe23c35943cda7f99fde013557fe</link>
		<pubDate>Fri, 20 Jan 2012 18:46:17 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/3558fe23c35943cda7f99fde013557fe#3558fe23c35943cda7f99fde013557fe</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c3558fe23c35943cda7f99fde013557fe">Dr Herbie</a>:IEnumerable&lt;IFruit&gt; fruits = IReturnAnIEnumerableOfApples(); //&nbsp;IFruit &lt;- IApple</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/1d6df58a25d64cffad4b9fde0139ed96#1d6df58a25d64cffad4b9fde0139ed96</link>
		<pubDate>Fri, 20 Jan 2012 19:02:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/1d6df58a25d64cffad4b9fde0139ed96#1d6df58a25d64cffad4b9fde0139ed96</guid>
		<dc:creator>Ion Todirel</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Ion Todirel/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cb2c3713afde443bea3a59fde011ecbe4">Surendiran Bala</a>:</p><p>just like the linked I posted said,</p><p>Once you define an Interface and start to use it in many other classes, you cannot change the interface easily. Because for every new method you added to the existing interface, all the classes that includes the interface has to implement your new method, otherwise it wouldn't compile obviously.</p><p>This is mainly because interface (also abstract methods) do not have a default implementation, thus, you have to implement it everywhere.</p><p>But, if you use this at base</p><p><pre class="brush: csharp">protected string _modelName = &quot;I am base model&quot;;
public virtual string GetModelName() { return _modelName; }</pre></p><p>your sub-classes automatically can do GetModelName without any change in code.</p><p>of course, they all return &quot;I am base model&quot; if you really do nothing. You can easily add</p><p><pre class="brush: csharp">_modelName  = &quot;I am newer model&quot;;</pre></p><p>in the constructor to make it meaningful. If you don't this, it is only silly, but, the code is definitly fine.&nbsp;Of course, the not so silly example would be adding a timestamp, which you really don't need to change anything to sub-classes.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b378914dd7fc4a47ad289fde014fb218#b378914dd7fc4a47ad289fde014fb218</link>
		<pubDate>Fri, 20 Jan 2012 20:22:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/b378914dd7fc4a47ad289fde014fb218#b378914dd7fc4a47ad289fde014fb218</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Richard, you should ask this question in your next dev candidate interview <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>Interfaces are <em>purely</em> abstract and <em>guarantee</em> member invariance, by definition. As Sven mentioned, they represent &quot;can do&quot; or&nbsp;an invariant&nbsp;<em>contract</em> that specifies &quot;can do and will always do as expected to do&quot;, to be precise. Once an interface is defined, that's it. You must never change it's member signatures. Ever.<br><br>Abstract classes, on the other hand,&nbsp;are <em>classes</em> that can be purely abstract (like an interface), can't be instantiated like a non-abstract class, and <em>must be</em> inherited (VB makes this characteristic obvious with the <em>MustInherit</em> modifier versus C#'s <em>abstract</em>, which is arguably a more abstract way&nbsp; of expressing that a class must be used as a base class, can't be instantiated and doesn't need to possess any&nbsp;implemented members or can provide full member implementations). <br><br>So, for example, if you want to be able to make changes to the <em>implementations</em> of some abstract type's members&nbsp;<em>without breaking current consumers</em>, you use an abstract class. If you want to guarantee that a type conforms to an invariant abstract functional specification ( <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /> ), use an interface. In other words, abstract classes are useful for component versioning (you can change their implementations without changing the <em>definition</em> of the class).<br><br>At any rate, enough of my rambling. Here's what MSDN says ( and it's right <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /> )</p><p>===========================================================================</p><p>Here are some recommendations to help you to decide whether to use an interface or an abstract class to provide polymorphism for your components.</p><ul><li>If you anticipate creating multiple versions of your component, create an abstract class. Abstract classes provide a simple and easy way to version your components. By updating the base class, all inheriting classes are automatically updated with the change. Interfaces, on the other hand, cannot be changed once created. If a new version of an interface is required, you must create a whole new interface. </li><li>If the functionality you are creating will be useful across a wide range of disparate objects, use an interface. Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing common functionality to unrelated classes. </li><li>If you are designing small, concise bits of functionality, use interfaces. If you are designing large functional units, use an abstract class. </li><li>If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members. </li></ul><p><br>C</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/cc6a9034a17f4824b6109fde016cba12#cc6a9034a17f4824b6109fde016cba12</link>
		<pubDate>Fri, 20 Jan 2012 22:07:55 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/cc6a9034a17f4824b6109fde016cba12#cc6a9034a17f4824b6109fde016cba12</guid>
		<dc:creator>Charles</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Charles/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#ccc6a9034a17f4824b6109fde016cba12">Charles</a>:&nbsp; Indeed, I have been using this question during interviews, but am usually satisfied if they know that an abstract class can define method bodies, or have abstract methods without definitions, while an interface's methods have only the declaration and no definition (or method body/implementation).&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />&nbsp; Your answer is much better, and it's good to see the discussion about it here to put things into perspective.&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/4374ecd63fd44e78a8339fde018ae9a3#4374ecd63fd44e78a8339fde018ae9a3</link>
		<pubDate>Fri, 20 Jan 2012 23:57:49 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/4374ecd63fd44e78a8339fde018ae9a3#4374ecd63fd44e78a8339fde018ae9a3</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>There is no decree that one can not be used in place of the other, in some cases they are very well indistinguishable, but in some other cases there is no way that one can be used in place of the other, the question is what is the purpose that they are being used for, some can only be&nbsp;fulfilled&nbsp;with the usage of interface while others require the usage of abstract class.</p><p>@Sven : Thank you, I edited my post</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6b9aa0d1dbb54713a5049fdf002fb0a3#6b9aa0d1dbb54713a5049fdf002fb0a3</link>
		<pubDate>Sat, 21 Jan 2012 02:53:38 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6b9aa0d1dbb54713a5049fdf002fb0a3#6b9aa0d1dbb54713a5049fdf002fb0a3</guid>
		<dc:creator>Arjang</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Arjang/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c6b9aa0d1dbb54713a5049fdf002fb0a3">Arjang</a>: The point is to determine when you should use one or the other, since they both appear to offer similar functionality.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6a4fc0b15a3748b3b4569fdf003149a8#6a4fc0b15a3748b3b4569fdf003149a8</link>
		<pubDate>Sat, 21 Jan 2012 02:59:27 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6a4fc0b15a3748b3b4569fdf003149a8#6a4fc0b15a3748b3b4569fdf003149a8</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>The only specific reason I've ever seen for using an Abstract class is when creating code using the (Gang of Four)&nbsp;template pattern.&nbsp; It's&nbsp;not even neccessary then, and the pattern is&nbsp;often complicated and non-intuative unless you have access to the code itself, so just don't.&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/64c0b63e0f494b1988b19fdf00dd43ad#64c0b63e0f494b1988b19fdf00dd43ad</link>
		<pubDate>Sat, 21 Jan 2012 13:25:35 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/64c0b63e0f494b1988b19fdf00dd43ad#64c0b63e0f494b1988b19fdf00dd43ad</guid>
		<dc:creator>ScanIAm</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/ScanIAm/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>I agree with Charles that &quot;abstract&quot; (and I'll add &quot;sealed&quot;) are very poorly named keywords. NoInherit and MustInherit (or NoInstantiate) would be better more descriptive names. Or something like like an ACL:</p><p>class Blah :<br>Allow Inheritance For Assembly;<br>Deny Inheritance, Instantiation For All</p><p>{</p><p>}</p><p>I think this would be similar to &quot;internal abstract&quot;?</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/2f7e919f9feb4087bb739fe001166aea#2f7e919f9feb4087bb739fe001166aea</link>
		<pubDate>Sun, 22 Jan 2012 16:53:41 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/2f7e919f9feb4087bb739fe001166aea#2f7e919f9feb4087bb739fe001166aea</guid>
		<dc:creator>Bass</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Bass/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c2f7e919f9feb4087bb739fe001166aea">Bass</a>: I think <em>sealed</em> is perfect for terse languages like C#, far better than <em>final</em> in Java.</p><p>Visual Basic is incorrect in calling <em>NoInherit</em> and <em>MustInherit</em> keywords, as I always think that they are not single words, it is a case of comparing <em>apples</em> to <em>orangelemons</em> which is unfair.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c4904a61e49e4a629c299fe00129a9ef#c4904a61e49e4a629c299fe00129a9ef</link>
		<pubDate>Sun, 22 Jan 2012 18:03:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c4904a61e49e4a629c299fe00129a9ef#c4904a61e49e4a629c299fe00129a9ef</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cc4904a61e49e4a629c299fe00129a9ef">vesuvius</a>: And &quot;foreach&quot; in C# is a single word?</p><p>Although it's weird that they didn't split them in VB, as VB has plenty of two-word keywords, like &quot;For Each&quot; or&nbsp;&quot;End For/While/Sub/Function&quot;. Even C# has at least one two-word keyword: &quot;yield return&quot; (yield is not a keyword by itself, and can be used as an identifier).</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/74848ec4aed0426b9de29fe1003de342#74848ec4aed0426b9de29fe1003de342</link>
		<pubDate>Mon, 23 Jan 2012 03:45:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/74848ec4aed0426b9de29fe1003de342#74848ec4aed0426b9de29fe1003de342</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>double</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/9e3b878a28f54a3bb6179fe100936584#9e3b878a28f54a3bb6179fe100936584</link>
		<pubDate>Mon, 23 Jan 2012 08:56:39 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/9e3b878a28f54a3bb6179fe100936584#9e3b878a28f54a3bb6179fe100936584</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c74848ec4aed0426b9de29fe1003de342">Sven Groot</a>:I guess a perfect time to use the phrase &quot;an exception to the rule&quot; as there really is no way to reduce the words in the expression. Even in F# you ed up with three keywords</p><p><pre class="brush: csharp">// Looping over a list.
let list1 = [ 1; 5; 100; 450; 788 ]
for i in list1 do
   printfn &quot;%d&quot; i</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c9e1a80d0e824902ae0c9fe10093686b#c9e1a80d0e824902ae0c9fe10093686b</link>
		<pubDate>Mon, 23 Jan 2012 08:56:41 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/c9e1a80d0e824902ae0c9fe10093686b#c9e1a80d0e824902ae0c9fe10093686b</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>I am lost without intellisense,..</p><p>I have to keep up with WPF, WCF, Silverlight, SQL Server, SSIS, SSAS, EF, WF, WCF Api, OData, WCF Dataservices, Prism, MVVM, Wndows Azure, WP7, ASP.Net, Rx, LINQ, PLINQ, ASP.Net MVC, HTML5, jQuery, javascript, C#&nbsp;etc etc etc,..</p><p>So FRIKKEN sue me if I forget how to do a FRIKKEN foreach loop! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /></p><p><pre class="brush: text">var enum = list.GetEnumerator();
while(enum.GetNext())
{

}</pre></p><p>Did I pass?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/55c6c2778413455989789fe100a1508c#55c6c2778413455989789fe100a1508c</link>
		<pubDate>Mon, 23 Jan 2012 09:47:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/55c6c2778413455989789fe100a1508c#55c6c2778413455989789fe100a1508c</guid>
		<dc:creator>Maddus Mattus</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Maddus Mattus/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cc9e1a80d0e824902ae0c9fe10093686b">vesuvius</a>: How about java (as well as C&#43;&#43;11)</p><p><pre class="brush: cpp">for( int value : list )
    System.out.println(value);</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d537cd6a5231457c9d469fe100b81cb2#d537cd6a5231457c9d469fe100b81cb2</link>
		<pubDate>Mon, 23 Jan 2012 11:10:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d537cd6a5231457c9d469fe100b81cb2#d537cd6a5231457c9d469fe100b81cb2</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/55c6c2778413455989789fe100a1508c">5 hours&nbsp;ago</a>, <a href="/Niners/Maddus%20Mattus">Maddus&nbsp;Mattus</a> wrote</p><p>I am lost without intellisense,..</p><p>I have to keep up with WPF, WCF, Silverlight, SQL Server, SSIS, SSAS, EF, WF, WCF Api, OData, WCF Dataservices, Prism, MVVM, Wndows Azure, WP7, ASP.Net, Rx, LINQ, PLINQ, ASP.Net MVC, HTML5, jQuery, javascript, C#&nbsp;etc etc etc,..</p><p>So FRIKKEN sue me if I forget how to do a FRIKKEN foreach loop! <img src="http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9" alt="Wink"></p><div class="syntaxhighlighterHolder"><div id="highlighter_449395" class="syntaxhighlighter text ie"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="text plain">var enum = list.GetEnumerator();</code></div><div class="line number2 index1 alt1"><code class="text plain">while(enum.GetNext())</code></div><div class="line number3 index2 alt2"><code class="text plain">{</code></div><div class="line number4 index3 alt1">&nbsp;</div><div class="line number5 index4 alt2"><code class="text plain">}</code></div></div></td></tr></tbody></table></div></div><p>Did I pass?</p><p></p></div></blockquote><p></p><p>LOL, no, there's no GetNext, it's MoveNext &#43; Current.&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/691afed613be4bbb89ce9fe100f61878#691afed613be4bbb89ce9fe100f61878</link>
		<pubDate>Mon, 23 Jan 2012 14:56:00 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/691afed613be4bbb89ce9fe100f61878#691afed613be4bbb89ce9fe100f61878</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>There isn't much difference between overloading an existing construct and introducing a new keyword; the latter is only undesirable when the keyword would make an excellent identifier which I don't think applies to &quot;foreach&quot;.</p><p>The tenet that terseness trumps readability in language design was a great concept in the '70, when you had to type every single character in your program (and possibly getting it punched in a card). Maybe it's high time we reevaluated the whole thing.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7e8222fdb8f747bfa5fc9fe100f69b5c#7e8222fdb8f747bfa5fc9fe100f69b5c</link>
		<pubDate>Mon, 23 Jan 2012 14:57:52 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7e8222fdb8f747bfa5fc9fe100f69b5c#7e8222fdb8f747bfa5fc9fe100f69b5c</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c4374ecd63fd44e78a8339fde018ae9a3">Richard.Hein</a>:</p><p>thats the common defintion about abstract class and interface...but my question is how to chose either one...on what basis you will go for abstract and interface</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/75bfb0a54f5b4ce690fe9fe10107c37f#75bfb0a54f5b4ce690fe9fe10107c37f</link>
		<pubDate>Mon, 23 Jan 2012 16:00:20 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/75bfb0a54f5b4ce690fe9fe10107c37f#75bfb0a54f5b4ce690fe9fe10107c37f</guid>
		<dc:creator>Surendiran Balasubramanian</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Surendiran Bala/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/75bfb0a54f5b4ce690fe9fe10107c37f">16 minutes&nbsp;ago</a>, <a href="/Niners/Surendiran%20Bala">Surendiran&nbsp;Bala</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c4374ecd63fd44e78a8339fde018ae9a3">Richard.Hein</a>:</p><p>thats the common defintion about abstract class and interface...but my question is how to chose either one...on what basis you will go for abstract and interface</p><p></p></div></blockquote><p></p><p>OK for me it's as follows</p><p>1) Do you have common code which will need inheriting in all classes? Abstract class.</p><p>2) Is your functionality exposed outside your assembly? Consider an interface.</p><p>3) Will you have multiple things on a single class (for example Readable, Writeable), which could be combined? Has to be an interface.</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6e8127da990c4fb4a65e9fe1010d05a1#6e8127da990c4fb4a65e9fe1010d05a1</link>
		<pubDate>Mon, 23 Jan 2012 16:19:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6e8127da990c4fb4a65e9fe1010d05a1#6e8127da990c4fb4a65e9fe1010d05a1</guid>
		<dc:creator>blowdart</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/blowdart/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c691afed613be4bbb89ce9fe100f61878">Richard.Hein</a>: damn,..</p><p>Made my point exactly, where is my intellisense!</p><p>Do I at least get credits for thinking outside the box?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/db63f70bff114288892c9fe10112eeb1#db63f70bff114288892c9fe10112eeb1</link>
		<pubDate>Mon, 23 Jan 2012 16:40:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/db63f70bff114288892c9fe10112eeb1#db63f70bff114288892c9fe10112eeb1</guid>
		<dc:creator>Maddus Mattus</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Maddus Mattus/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/6e8127da990c4fb4a65e9fe1010d05a1">37 minutes&nbsp;ago</a>, <a href="/Niners/blowdart">blowdart</a> wrote</p><p>*snip*</p><p>OK for me it's as follows</p><p>1) Do you have common code which will need inheriting in all classes? Abstract class.</p><p>2) Is your functionality exposed outside your assembly? Consider an interface.</p><p>3) Will you have multiple things on a single class (for example Readable, Writeable), which could be combined? Has to be an interface.</p><p></p></div></blockquote><p></p><p>Again, interfaces and abstract classes aren't mutually exclusive. So you can start with an interface to expose functionality outside your assembly, and then create an abstract class that implements that interface to have common code for the branch of classes that you would use internally.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/bbd08b19d94d481aa4849fe101181115#bbd08b19d94d481aa4849fe101181115</link>
		<pubDate>Mon, 23 Jan 2012 16:59:41 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/bbd08b19d94d481aa4849fe101181115#bbd08b19d94d481aa4849fe101181115</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/db63f70bff114288892c9fe10112eeb1">1 hour&nbsp;ago</a>, <a href="/Niners/Maddus%20Mattus">Maddus&nbsp;Mattus</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c691afed613be4bbb89ce9fe100f61878">Richard.Hein</a>: damn,..</p><p>Made my point exactly, where is my intellisense!</p><p>Do I at least get credits for thinking outside the box?</p><p></p></div></blockquote><p></p><p>Ok.&nbsp;<img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />&nbsp;&nbsp; IEnumerable should have a GetNext() anyways.&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/44dcc2839aa646f592e59fe101247e2b#44dcc2839aa646f592e59fe101247e2b</link>
		<pubDate>Mon, 23 Jan 2012 17:44:56 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/44dcc2839aa646f592e59fe101247e2b#44dcc2839aa646f592e59fe101247e2b</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c75bfb0a54f5b4ce690fe9fe10107c37f">Surendiran Bala</a>: I would say you need to write a lot of code, as a junior developer, you should be able to have code reviews if you are working on an important piece of code, after writing a few programs you will tacitly know how to choose one over the other.</p><p>That's is why this question has taken three pages and things are evidently still not clear to you, people cannot simply&nbsp;explain <em>experience</em> to you, as in some ways you keep asking what hot or cold are, when you need to get your hands dirty and step up to the plate.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/1410a5adb64b4552a9869fe10124a3b3#1410a5adb64b4552a9869fe10124a3b3</link>
		<pubDate>Mon, 23 Jan 2012 17:45:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/1410a5adb64b4552a9869fe10124a3b3#1410a5adb64b4552a9869fe10124a3b3</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>In a project I'm working on, I created an interface because I wanted the ability to swap out types (the system can be extended through the creation of more types that implement the interface). After crafting two types, I noticed quite a bit of code redundancy, so I created an abstract class to hold the shared code and then had my two types inherit from that class. And then I also have Unity for swapping out the types at runtime.</p><p>I usually use interfaces for the plugin-like scenario, when I want to offer a way to extend behavior without requiring changes to the code itself. I don't really know of the formal use of an abstract class...it just ends up being a container for redundant code such that it does not have a full enough implementation to stand on its own as an actual type.</p><p>&nbsp;</p><p>EDIT: This is actually similar to what cbae had posted above.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/97c3ccef5c5d478e84309fe10124fbca#97c3ccef5c5d478e84309fe10124fbca</link>
		<pubDate>Mon, 23 Jan 2012 17:46:43 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/97c3ccef5c5d478e84309fe10124fbca#97c3ccef5c5d478e84309fe10124fbca</guid>
		<dc:creator>System.UnauthorizedException: selected Species does not have access to target resource &#39;name&#39;.</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/MasterPie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Design with interfaces, always; implement with abstract classes, sometimes.</p><p>If you design around interfaces you ensure the best decoupling between components, and there are nothing but other interfaces and primitive types&nbsp;exposed.&nbsp; You'll have maximized the flexiblity of the implementation, while ensuring a stable,&nbsp;long-term contract between the components of your application.&nbsp;</p><p>However, deciding if something should be defined as an abstract class usually happens during implementation (or planning the implementation), when&nbsp;one realizes&nbsp;that a few concrete types (that&nbsp;may or may not share common interfaces),&nbsp;are essentially the same in some way; in a functional sense, not just on the interface, but &quot;inside&quot; where they have similar structures or algorithms.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/127972656bac47989d959fe1012bd838#127972656bac47989d959fe1012bd838</link>
		<pubDate>Mon, 23 Jan 2012 18:11:42 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/127972656bac47989d959fe1012bd838#127972656bac47989d959fe1012bd838</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/97c3ccef5c5d478e84309fe10124fbca">30 minutes&nbsp;ago</a>, <a href="/Niners/MasterPie">MasterPie</a> wrote</p><p>EDIT: This is actually similar to what cbae had posted above.</p><p></p></div></blockquote><p></p><p>Mine is too .. which tells me we should abstract out the details of all of these posts that share common implementation details into one base post, see what's left over and derive posts from there ... <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' />.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/edebc43f5de449639ac79fe1012e7993#edebc43f5de449639ac79fe1012e7993</link>
		<pubDate>Mon, 23 Jan 2012 18:21:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/edebc43f5de449639ac79fe1012e7993#edebc43f5de449639ac79fe1012e7993</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/bbd08b19d94d481aa4849fe101181115">2 hours&nbsp;ago</a>, <a href="/Niners/cbae">cbae</a> wrote</p><p>*snip*</p><p>Again, interfaces and abstract classes aren't mutually exclusive. So you can start with an interface to expose functionality outside your assembly, and then create an abstract class that implements that interface to have common code for the branch of classes that you would use internally.</p><p></p></div></blockquote><p></p><p>Oh indeed so. Take something like a file management class; you could start off with IReadable and IWriteable and then implement FileBase which takes both those as an interface. But I'd still be starting with the interfaces.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7085f09388274b99b9ae9fe1013cae27#7085f09388274b99b9ae9fe1013cae27</link>
		<pubDate>Mon, 23 Jan 2012 19:12:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7085f09388274b99b9ae9fe1013cae27#7085f09388274b99b9ae9fe1013cae27</guid>
		<dc:creator>blowdart</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/blowdart/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#c97c3ccef5c5d478e84309fe10124fbca">MasterPie</a>: Speaking of Unity and interfaces and covariance, when I first started rearchitecting my code for dependency injection with Unity, I fell into the trap of &quot;overengineering&quot; by adding a bunch of unnecessary interfaces, including generic interfaces.&nbsp;When it was time to piece all the components together in the application, I got bit in the a$$ by the limitations in C#'s support of variance in generics.</p><p>All the examples for Unity and other IoC containers give you the impression that you have to use interfaces to map to concrete types for the ENTIRE dependency graph. As it turns out, you can just register concrete types (without mapping them to any interface) so that Unity knows to use the concrete type for other dependencies or to build up the dependencies, which may or may not involve type mapping, for that concrete type.</p><p>I'm not saying you should avoid using interfaces, but you should definitely consider if there's a good reason to use an interface, and doing so just to shoe-horn an IoC container into your application isn't one of them.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7920a8cfd1124d4eb0739fe1014214b8#7920a8cfd1124d4eb0739fe1014214b8</link>
		<pubDate>Mon, 23 Jan 2012 19:32:39 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/7920a8cfd1124d4eb0739fe1014214b8#7920a8cfd1124d4eb0739fe1014214b8</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cedebc43f5de449639ac79fe1012e7993">Richard.Hein</a>: <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-4.gif?v=c9' alt='Tongue Out' /></p><p>@cbae: Yeah, the decision to use Unity came after I had designed and implemented everything...I just wanted to be able to swap things out without having to recompile.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/0dcba459b202470ab4589fe1014958d7#0dcba459b202470ab4589fe1014958d7</link>
		<pubDate>Mon, 23 Jan 2012 19:59:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/0dcba459b202470ab4589fe1014958d7#0dcba459b202470ab4589fe1014958d7</guid>
		<dc:creator>System.UnauthorizedException: selected Species does not have access to target resource &#39;name&#39;.</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/MasterPie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/f7791a2cbe4c424e9cc69fdd0153877a">4 days&nbsp;ago</a>, <a href="/Niners/wkempf">wkempf</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cb45bba8533ff4f65b9f69fdd01507c55">Richard.Hein</a>: *sigh* No, no methods on an interface are virtual. The terms &quot;virtual&quot; and &quot;abstract&quot; apply only to classes. For that matter, @magicalclick is just as wrong when he says &quot;if you want multiple inheritance, interface only&quot;, because you don't inherit interfaces. You implement them. Right now I may sound like a grammar *, but most of the confusion surrounding these topics comes from incorrect usage of terms such as these.</p><p>The fact that methods/properties on an interface aren't virtual/abstract is important to note because if they were you'd be able to override them when you inherit from a class that implements the interface. You can't, unless the implementation declares the method/property to be virtual/abstract.</p><p></p></div></blockquote><p></p><p>Actually the&nbsp;<em>keywords&nbsp;</em>virtual and abstract apply only to classes. The <em>term</em> virtual is entirely valid, because interfaces are implemented via a vtable through which the call is made.</p><p>Also you&nbsp;<em>can&nbsp;</em>override methods of an interface by implementing them explicitly on derived classes for exactly this reason (you shouldn't because that way madness lies, but you&nbsp;<em>can -&nbsp;</em>and one example of where I've seen this happen is re-implementing IDisposable on top of a base class which is itself IDisposable in order that when you down-cast to the base class and it gets disposed, you properly dispose the elements of the derived class as well)</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/4dfbddaf27664fffafb29fe200041049#4dfbddaf27664fffafb29fe200041049</link>
		<pubDate>Tue, 24 Jan 2012 00:14:47 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/4dfbddaf27664fffafb29fe200041049#4dfbddaf27664fffafb29fe200041049</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>Good article for Abstract vs Interface</p><p>&nbsp;</p><p><a href="http://www.codeproject.com/Articles/36870/Abstract-Class-Vs-Interface">http://www.codeproject.com/Articles/36870/Abstract-Class-Vs-Interface</a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d44a7200a29f45e383b59fe200ea1ce1#d44a7200a29f45e383b59fe200ea1ce1</link>
		<pubDate>Tue, 24 Jan 2012 14:12:22 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/d44a7200a29f45e383b59fe200ea1ce1#d44a7200a29f45e383b59fe200ea1ce1</guid>
		<dc:creator>Surendiran Balasubramanian</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Surendiran Bala/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Abstract class vs Interface -When to use them and which scenario</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario#cc8ba94b86db645d7befd9fdd012f94ce">Surendiran Bala</a>:Well lets's start from&nbsp;beginning&quot;<span>&nbsp;what is the problem in using Abstract in place of interface and vice versa.??</span>&quot;&nbsp;</p><p>Why to use each other in place of another??this question is basically wrong, but for&nbsp;curiosity&nbsp;it is d perfect question ,</p><p>Abstract classes are classes and interface are nt classes , on of d most im thing is may be we'll get a situation where we have to inherit multiple attributes ,functions ,so we need interface there,</p><p>,in a way we can say that Abstract type should be used when we need to imply functions or inherit functions , and interface are for classes , Lets see in a different way ,</p><p>Consider i need to define basic functionality so i create a abstract class and let other classes override functions in their own definition, nd I now if i need to create a class which can have attributes and functionality from two different classes i'll use interface,</p><p>Like a class Director(This is someone else example from a blog) it has some basic functionality direction management blah blah, and there is a class Actor its main functionality is to act,, Now may be one in a thousand cases there will be a possibility That actor can be a director too so he has his own class methods and attr and it inherits Director&nbsp;Attributes&nbsp;also &nbsp;,,so the now created class can have both&nbsp;functionality&nbsp;of an actor class and director class, nw if i create an abstract class than i have to override its functions and i can not inherit two or more than two classes and creating a&nbsp;hierarchical order of&nbsp;Inheritance&nbsp;like <strong>Director - -Actor--New actor/Director</strong> ....will be a overhead and cause prob, may be some actor&nbsp;doesn't&nbsp;want to be a director&nbsp;, So in short when we Interface are mainly for multiple&nbsp;inheritance&nbsp;abstract are for providing a nearly common functionality,Which interface also allows but in a different way .</p><p>&nbsp;</p><p>well im a very young player in this playground of OOp and .NET ,</p><p>Hope im making some sense here ,but i also know that this is not a good formatted view on Interface and Abstract Classes .</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/08ff7e540ec44d4bad0aa08900cd1f51#08ff7e540ec44d4bad0aa08900cd1f51</link>
		<pubDate>Mon, 09 Jul 2012 12:26:49 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Abstract-class-vs-Interface-When-to-use-them-and-which-scenario/08ff7e540ec44d4bad0aa08900cd1f51#08ff7e540ec44d4bad0aa08900cd1f51</guid>
		<dc:creator>illdancingspirit</dc:creator>
		<slash:comments>60</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/illdancingspirit/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>