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

<channel>
	<title>Interview &#187; RSystems</title>
	<atom:link href="http://interview.msdotnetheaven.com/topics/company-asked-interview-questions/rsystems/feed" rel="self" type="application/rss+xml" />
	<link>http://interview.msdotnetheaven.com</link>
	<description>Best place for interview preparation</description>
	<lastBuildDate>Sat, 21 May 2011 21:43:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Can I inherit two difference classes to partial classes?</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:50:50 +0000</pubDate>
		<dc:creator>smartbrain</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Company asked interview questions]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[RSystems]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[partial class]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=648</guid>
		<description><![CDATA[Q. Can I inherit two difference classes to partial classes? Following is the whole scenario of this question:
I have two classes XYZ and ABC and two partial classes  of class myClass now is it possible:
partial class myClass : XYZ
{
}
partial class myClass : ABC
{
}
Ans:  This question I have asked in RSystems, Noida and I am sharing hereunder with you :
We can&#8217;t inherit two difference classes to partial class because in C# multiple inheritance is not possible using classes.
The main reason is in C# we cant do the following:
class myClass : XYZ, ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/what-are-classes-and-structures.html' rel='bookmark' title='Permanent Link: What are Classes and structures'>What are Classes and structures</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/csharp-interview-questions/when-you-inherit-a-protected-class-level-variablewho-is-it-available-to.html' rel='bookmark' title='Permanent Link: When you inherit a protected-class-level variable,who is it available to?'>When you inherit a protected-class-level variable,who is it available to?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html' rel='bookmark' title='Permanent Link: Can we store filtered DataView in ViewState?'>Can we store filtered DataView in ViewState?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Q. Can I inherit two difference classes to partial classes? Following is the whole scenario of this question:</p>
<p>I have two classes XYZ and ABC and two partial classes  of class myClass now is it possible:</p>
<blockquote><p>partial class myClass : XYZ</p>
<p>{</p>
<p>}</p>
<p>partial class myClass : ABC</p>
<p>{</p>
<p>}</p></blockquote>
<p><strong><span style="text-decoration: underline;">Ans</span></strong>:  This question I have asked in RSystems, Noida and I am sharing hereunder with you :</p>
<p>We can&#8217;t inherit two difference classes to partial class because in C# multiple inheritance is not possible using classes.</p>
<p>The main reason is in C# we cant do the following:</p>
<blockquote><p>class myClass : XYZ, ABC</p>
<p>{</p>
<p>}</p></blockquote>
<p>It will throw an error while we compile the code.</p>
<address><em>Note: if anyone has better views for this question please share.</em></address>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Can+I+inherit+two+difference+classes+to+partial+classes%3F+http%3A%2F%2Ftinyurl.com%2F5t4bx47" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/twitter/de/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Can+I+inherit+two+difference+classes+to+partial+classes%3F+http%3A%2F%2Ftinyurl.com%2F5t4bx47" title="Post to Twitter">Tweet This Post</a></p></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=648&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/what-are-classes-and-structures.html' rel='bookmark' title='Permanent Link: What are Classes and structures'>What are Classes and structures</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/csharp-interview-questions/when-you-inherit-a-protected-class-level-variablewho-is-it-available-to.html' rel='bookmark' title='Permanent Link: When you inherit a protected-class-level variable,who is it available to?'>When you inherit a protected-class-level variable,who is it available to?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html' rel='bookmark' title='Permanent Link: Can we store filtered DataView in ViewState?'>Can we store filtered DataView in ViewState?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

