<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Block Inheritance</title>
	<atom:link href="http://www.technicalinterviews.net/block-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technicalinterviews.net/block-inheritance/</link>
	<description>This site features a collection of common technical interview questions gathered by a group of programmers who have been through, and given, lots of technical interviews. There is an emphasis on C++ and game programming technical interviews, but most of the questions are relevant to any technical interview.</description>
	<pubDate>Thu, 09 Sep 2010 02:59:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: vishal</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-2729</link>
		<dc:creator>vishal</dc:creator>
		<pubDate>Thu, 01 Apr 2010 11:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-2729</guid>
		<description>sorry i mean sealed modifier is used to prevent a class from being inherited by another class. some class are not be inherited in future. so ti inheriting this class by another class we used sealed.</description>
		<content:encoded><![CDATA[<p>sorry i mean sealed modifier is used to prevent a class from being inherited by another class. some class are not be inherited in future. so ti inheriting this class by another class we used sealed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vishal</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-2728</link>
		<dc:creator>vishal</dc:creator>
		<pubDate>Thu, 01 Apr 2010 11:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-2728</guid>
		<description>sealed modifier is used to keep the class inherited.</description>
		<content:encoded><![CDATA[<p>sealed modifier is used to keep the class inherited.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zonke mbindela</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-2727</link>
		<dc:creator>zonke mbindela</dc:creator>
		<pubDate>Thu, 01 Apr 2010 09:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-2727</guid>
		<description>This test is not related to what i do at work, it is designed for people that work with object orianted programming, so I dont see value in me doing this test.</description>
		<content:encoded><![CDATA[<p>This test is not related to what i do at work, it is designed for people that work with object orianted programming, so I dont see value in me doing this test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: radliwag</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-2123</link>
		<dc:creator>radliwag</dc:creator>
		<pubDate>Sun, 16 Aug 2009 15:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-2123</guid>
		<description>This can be done by declaring the class as a sealed class.</description>
		<content:encoded><![CDATA[<p>This can be done by declaring the class as a sealed class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashley Visagie</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-1878</link>
		<dc:creator>Ashley Visagie</dc:creator>
		<pubDate>Wed, 29 Apr 2009 04:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-1878</guid>
		<description>Yes, use the sealed modifier as follows:


    sealed class NotInheritable { ... }


You would use this to prevent unintential inheritance, or for run-time optimization.</description>
		<content:encoded><![CDATA[<p>Yes, use the sealed modifier as follows:</p>
<p>    sealed class NotInheritable { &#8230; }</p>
<p>You would use this to prevent unintential inheritance, or for run-time optimization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-1873</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Thu, 09 Apr 2009 00:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-1873</guid>
		<description>The above comment is incorrect.  Making a class constructor private will not prevent a class from being inherited by another class, it would simply prevent it from being instantiated.  The desired functionality would be accomplished by using the "sealed" keyword in the class declaration. (i.e. public sealed class MyClass).  

The sealed modifier is primarily used to prevent unintended derivation, such as when a class contains a concrete implementation of an abstract base.  In this case the developer of the sealed class would want other implementations to inherit from the abstract base class and instead of inheriting from the sealed concrete implementation.  It also enables certain run-time optimizations.  In particular, because a sealed class is known to never have any derived classes, it is possible to transform virtual function member invocations on sealed class instances into non-virtual invocations.</description>
		<content:encoded><![CDATA[<p>The above comment is incorrect.  Making a class constructor private will not prevent a class from being inherited by another class, it would simply prevent it from being instantiated.  The desired functionality would be accomplished by using the &#8220;sealed&#8221; keyword in the class declaration. (i.e. public sealed class MyClass).  </p>
<p>The sealed modifier is primarily used to prevent unintended derivation, such as when a class contains a concrete implementation of an abstract base.  In this case the developer of the sealed class would want other implementations to inherit from the abstract base class and instead of inheriting from the sealed concrete implementation.  It also enables certain run-time optimizations.  In particular, because a sealed class is known to never have any derived classes, it is possible to transform virtual function member invocations on sealed class instances into non-virtual invocations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JR</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-1775</link>
		<dc:creator>JR</dc:creator>
		<pubDate>Wed, 02 Jul 2008 16:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-1775</guid>
		<description>try the 'sealed' keyword on the class definition. 

sealed class CantInheritMe {}</description>
		<content:encoded><![CDATA[<p>try the &#8217;sealed&#8217; keyword on the class definition. </p>
<p>sealed class CantInheritMe {}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodneyk</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-1684</link>
		<dc:creator>Rodneyk</dc:creator>
		<pubDate>Mon, 04 Feb 2008 16:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-1684</guid>
		<description>In C# the proper way to prevent a class from being inherited is to use the "sealed" modifier.

&lt;a href="http://msdn2.microsoft.com/en-us/library/88c54tsw(VS.71).aspx" rel="nofollow"&gt;Sealed classes&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>In C# the proper way to prevent a class from being inherited is to use the &#8220;sealed&#8221; modifier.</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/88c54tsw(VS.71).aspx" rel="nofollow">Sealed classes</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: say it</title>
		<link>http://www.technicalinterviews.net/block-inheritance/comment-page-1/#comment-1196</link>
		<dc:creator>say it</dc:creator>
		<pubDate>Thu, 28 Jun 2007 09:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/block-inheritance/#comment-1196</guid>
		<description>This can be done by making constructors of the class private and making use of Named constrcutors for the class</description>
		<content:encoded><![CDATA[<p>This can be done by making constructors of the class private and making use of Named constrcutors for the class</p>
]]></content:encoded>
	</item>
</channel>
</rss>
