<?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</title>
	<atom:link href="http://interview.msdotnetheaven.com/feed" rel="self" type="application/rss+xml" />
	<link>http://interview.msdotnetheaven.com</link>
	<description>Best place for interview preparation</description>
	<lastBuildDate>Thu, 29 Apr 2010 15:07:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Is it possible to create constructor for an Abstract class?</title>
		<link>http://interview.msdotnetheaven.com/general-interview-stuffs/is-it-possible-to-create-constructor-for-an-abstract-class.html</link>
		<comments>http://interview.msdotnetheaven.com/general-interview-stuffs/is-it-possible-to-create-constructor-for-an-abstract-class.html#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:07:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[c# interview question]]></category>

		<guid isPermaLink="false">http://www.interview.msdotnetheaven.com/?p=665</guid>
		<description><![CDATA[Yes, its possible to create constructors for Abstract classes.  We can create Private, Public and Protected constructors for Abstract classes
Example:
Abstract class  myAbstClass
{
public  myAbstClass()
{          }
private myAbstClass(int x)
{       //some implementation      }
protected myAbstClass(string strX, string strY, int x)
{    //some implementation }
}
 Tweet This PostReaders who viewed this page, also viewed:How can I create a Singleton class by using public constructor?Powered by Where did they go from here?

Related posts:How ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html' rel='bookmark' title='Permanent Link: How can I create a Singleton class by using public constructor?'>How can I create a Singleton class by using public constructor?</a></li>
<li><a href='http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html' rel='bookmark' title='Permanent Link: What is differance between Abstract and Interface'>What is differance between Abstract and Interface</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/csharp-interview-questions/how-do-you-inherit-from-a-class-in-c.html' rel='bookmark' title='Permanent Link: How do you inherit from a class in c#?'>How do you inherit from a class in c#?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Yes, its possible to create constructors for Abstract classes.  We can create Private, Public and Protected constructors for Abstract classes</p>
<blockquote><p>Example:</p>
<p>Abstract class  myAbstClass</p>
<p>{</p>
<p>public  myAbstClass()</p>
<p>{          }</p>
<p>private myAbstClass(int x)</p>
<p>{       //some implementation      }</p>
<p>protected myAbstClass(string strX, string strY, int x)</p>
<p>{    //some implementation }</p>
<p>}</p></blockquote>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Is+it+possible+to+create+constructor+for+an+Abstract+class%3F+http://oid2q.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Is+it+possible+to+create+constructor+for+an+Abstract+class%3F+http://oid2q.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html" rel="bookmark" class="wherego_title">How can I create a Singleton class by using public constructor?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=665&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html' rel='bookmark' title='Permanent Link: How can I create a Singleton class by using public constructor?'>How can I create a Singleton class by using public constructor?</a></li>
<li><a href='http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html' rel='bookmark' title='Permanent Link: What is differance between Abstract and Interface'>What is differance between Abstract and Interface</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/csharp-interview-questions/how-do-you-inherit-from-a-class-in-c.html' rel='bookmark' title='Permanent Link: How do you inherit from a class in c#?'>How do you inherit from a class in c#?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/general-interview-stuffs/is-it-possible-to-create-constructor-for-an-abstract-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write query to get custom results</title>
		<link>http://interview.msdotnetheaven.com/database-question-answer/write-query-to-get-custom-results.html</link>
		<comments>http://interview.msdotnetheaven.com/database-question-answer/write-query-to-get-custom-results.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 10:30:01 +0000</pubDate>
		<dc:creator>smartbrain</dc:creator>
				<category><![CDATA[Database Questions]]></category>
		<category><![CDATA[MsSql Server]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[Sql Server 2005]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=659</guid>
		<description><![CDATA[This question is asked in recent interview, following is the scenario:
Q. I have a following table :



University
UtoTal
Status
StatusCnt


U1
100
Pending
20


U1
100
Active
20


U1
100
Deferred
60


U2
60
Pending
20


U2
60
Active
20


U2
60
Deferred
20



I want results as :



University
UtoTal
Status
StatusCnt


U1
100
Pending
20




Active
20




Deferred
60


U2
60
Pending
20




Active
20




Deferred
20



Ans: At the time of interview I wasn&#8217;t easy with the answer but I wrote a query, but interviewer not satisfied.
I got the following proper query/solution from one of my colleagues Mr. sandeep Walia:
declare @tbl table(university varchar(100),Utotals int, status varchar(100),statuscnt int)
insert into @tbl(university,Utotals,status,statuscnt)
select &#8216;u1&#8242;,100,&#8217;pending&#8217;,20
union all
select &#8216;u1&#8242;,100,&#8217;Active&#8217;,20
union all
select &#8216;u1&#8242;,100,&#8217;Deferred&#8217;,60
union all
select &#8216;u2&#8242;,60,&#8217;pending&#8217;,20
union all
select &#8216;u2&#8242;,60,&#8217;Active&#8217;,20
union all
select &#8216;u2&#8242;,60,&#8217;Deferred&#8217;,20
select * from @tbl;
with cte as (
SELECT ROW_NUMBER() OVER(PARTITION BY university ORDER BY university DESC) AS RowID,
*
FROM ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html' rel='bookmark' title='Permanent Link: Create dynamic query with dynamic joins'>Create dynamic query with dynamic joins</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/i-need-to-view-the-number-of-tables-existing-under-one-particular-owner-is-it-possible-if-so-pl-give-the-sql-query-for-this.html' rel='bookmark' title='Permanent Link: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?'>I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This question is asked in recent interview, following is the scenario:</p>
<p>Q. I have a following table :</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="128" valign="top"><strong>University</strong></td>
<td width="128" valign="top"><strong>UtoTal</strong></td>
<td width="128" valign="top"><strong>Status</strong></td>
<td width="128" valign="top"><strong>StatusCnt</strong></td>
</tr>
<tr>
<td width="128" valign="top">U1</td>
<td width="128" valign="top">100</td>
<td width="128" valign="top">Pending</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top">U1</td>
<td width="128" valign="top">100</td>
<td width="128" valign="top">Active</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top">U1</td>
<td width="128" valign="top">100</td>
<td width="128" valign="top">Deferred</td>
<td width="128" valign="top">60</td>
</tr>
<tr>
<td width="128" valign="top">U2</td>
<td width="128" valign="top">60</td>
<td width="128" valign="top">Pending</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top">U2</td>
<td width="128" valign="top">60</td>
<td width="128" valign="top">Active</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top">U2</td>
<td width="128" valign="top">60</td>
<td width="128" valign="top">Deferred</td>
<td width="128" valign="top">20</td>
</tr>
</tbody>
</table>
<p>I want results as :</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="128" valign="top"><strong>University</strong></td>
<td width="128" valign="top"><strong>UtoTal</strong></td>
<td width="128" valign="top"><strong>Status</strong></td>
<td width="128" valign="top"><strong>StatusCnt</strong></td>
</tr>
<tr>
<td width="128" valign="top">U1</td>
<td width="128" valign="top">100</td>
<td width="128" valign="top">Pending</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top"></td>
<td width="128" valign="top"></td>
<td width="128" valign="top">Active</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top"></td>
<td width="128" valign="top"></td>
<td width="128" valign="top">Deferred</td>
<td width="128" valign="top">60</td>
</tr>
<tr>
<td width="128" valign="top">U2</td>
<td width="128" valign="top">60</td>
<td width="128" valign="top">Pending</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top"></td>
<td width="128" valign="top"></td>
<td width="128" valign="top">Active</td>
<td width="128" valign="top">20</td>
</tr>
<tr>
<td width="128" valign="top"></td>
<td width="128" valign="top"></td>
<td width="128" valign="top">Deferred</td>
<td width="128" valign="top">20</td>
</tr>
</tbody>
</table>
<p><strong>Ans:</strong> At the time of interview I wasn&#8217;t easy with the answer but I wrote a query, but interviewer not satisfied.</p>
<p>I got the following proper query/solution from one of my colleagues <strong>Mr. sandeep Walia:</strong></p>
<blockquote><p>declare @tbl table(university varchar(100),Utotals int, status varchar(100),statuscnt int)</p>
<p>insert into @tbl(university,Utotals,status,statuscnt)</p>
<p>select &#8216;u1&#8242;,100,&#8217;pending&#8217;,20</p>
<p>union all</p>
<p>select &#8216;u1&#8242;,100,&#8217;Active&#8217;,20</p>
<p>union all</p>
<p>select &#8216;u1&#8242;,100,&#8217;Deferred&#8217;,60</p>
<p>union all</p>
<p>select &#8216;u2&#8242;,60,&#8217;pending&#8217;,20</p>
<p>union all</p>
<p>select &#8216;u2&#8242;,60,&#8217;Active&#8217;,20</p>
<p>union all</p>
<p>select &#8216;u2&#8242;,60,&#8217;Deferred&#8217;,20</p>
<p>select * from @tbl;</p>
<p>with cte as (</p>
<p>SELECT ROW_NUMBER() OVER(PARTITION BY university ORDER BY university DESC) AS RowID,</p>
<p>*</p>
<p>FROM @tbl</p>
<p>)</p>
<p>SELECT case when rowid=1 then university else null end university,case when rowid=1 then Utotals else null end Utotals,status,statuscnt</p>
<p>FROM cte</p></blockquote>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Write+query+to+get+custom+results+http://ab5xn.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Write+query+to+get+custom+results+http://ab5xn.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/i-need-to-view-the-number-of-tables-existing-under-one-particular-owner-is-it-possible-if-so-pl-give-the-sql-query-for-this.html" rel="bookmark" class="wherego_title">I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=659&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html' rel='bookmark' title='Permanent Link: Create dynamic query with dynamic joins'>Create dynamic query with dynamic joins</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/i-need-to-view-the-number-of-tables-existing-under-one-particular-owner-is-it-possible-if-so-pl-give-the-sql-query-for-this.html' rel='bookmark' title='Permanent Link: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?'>I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/database-question-answer/write-query-to-get-custom-results.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create dynamic query with dynamic joins</title>
		<link>http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html</link>
		<comments>http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 15:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database Questions]]></category>
		<category><![CDATA[MsSql Server]]></category>
		<category><![CDATA[dynamic joins]]></category>
		<category><![CDATA[dynamic query]]></category>
		<category><![CDATA[joins]]></category>
		<category><![CDATA[Sql2005]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=656</guid>
		<description><![CDATA[Q. Here is the scenario:

declare @tt table(col1 varchar(10), joinexp varchar(100))
insert into @tt
select &#8216;c1&#8242;,&#8217;join table2 on table1.id = table1.id&#8217;
union all
select &#8216;c2&#8242;,&#8217;join table3 on table2.id = table1.id&#8217;
union all
select &#8216;c3&#8242;,&#8217;join table4 on table3.id = table1.id&#8217;
union all
select &#8216;c4&#8242;,&#8217;join table5 on table5.id = table1.id&#8217;
union all
select &#8216;c5&#8242;,NULL
union all
select &#8216;c6&#8242;,NULL
declare @str varchar(1000)
set @str = &#8216;Select c1,c4,c5,c8,c9 from table1&#8242;
declare @tt table(col1 varchar(10), joinexp varchar(100))insert into @ttselect &#8216;c1&#8242;,&#8217;join table2 on table1.id = table1.id&#8217;union allselect &#8216;c2&#8242;,&#8217;join table3 on table2.id = table1.id&#8217;union allselect &#8216;c3&#8242;,&#8217;join table4 on table3.id = table1.id&#8217;union allselect &#8216;c4&#8242;,&#8217;join table5 on table5.id = table1.id&#8217;union allselect &#8216;c5&#8242;,NULLunion allselect &#8216;c6&#8242;,NULL
declare @str ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/write-query-to-get-custom-results.html' rel='bookmark' title='Permanent Link: Write query to get custom results'>Write query to get custom results</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-the-syntax-required-for-the-creation-of-a-cursor.html' rel='bookmark' title='Permanent Link: What is the syntax required for the creation of a cursor?'>What is the syntax required for the creation of a cursor?</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Q. Here is the scenario:</p>
<blockquote>
<div id="_mcePaste">declare @tt table(col1 varchar(10), joinexp varchar(100))</div>
<div id="_mcePaste">insert into @tt</div>
<div id="_mcePaste">select &#8216;c1&#8242;,&#8217;join table2 on table1.id = table1.id&#8217;</div>
<div id="_mcePaste">union all</div>
<div id="_mcePaste">select &#8216;c2&#8242;,&#8217;join table3 on table2.id = table1.id&#8217;</div>
<div id="_mcePaste">union all</div>
<div id="_mcePaste">select &#8216;c3&#8242;,&#8217;join table4 on table3.id = table1.id&#8217;</div>
<div id="_mcePaste">union all</div>
<div id="_mcePaste">select &#8216;c4&#8242;,&#8217;join table5 on table5.id = table1.id&#8217;</div>
<div id="_mcePaste">union all</div>
<div id="_mcePaste">select &#8216;c5&#8242;,NULL</div>
<div id="_mcePaste">union all</div>
<div id="_mcePaste">select &#8216;c6&#8242;,NULL</div>
<div id="_mcePaste">declare @str varchar(1000)</div>
<div id="_mcePaste">set @str = &#8216;Select c1,c4,c5,c8,c9 from table1&#8242;</div>
<p>declare @tt table(col1 varchar(10), joinexp varchar(100))insert into @ttselect &#8216;c1&#8242;,&#8217;join table2 on table1.id = table1.id&#8217;union allselect &#8216;c2&#8242;,&#8217;join table3 on table2.id = table1.id&#8217;union allselect &#8216;c3&#8242;,&#8217;join table4 on table3.id = table1.id&#8217;union allselect &#8216;c4&#8242;,&#8217;join table5 on table5.id = table1.id&#8217;union allselect &#8216;c5&#8242;,NULLunion allselect &#8216;c6&#8242;,NULL<br />
declare @str varchar(1000)set @str = &#8216;Select c1,c4,c5,c8,c9 from table1&#8242;</p></blockquote>
<p>Now, in above create dynamic query with dynamic join with the subsequent column from C1,c4 etc.</p>
<blockquote><p>Ans: Select @str = @str + space(1) + joinexp</p>
<p>from @tt</p>
<p>where CharIndex(col1,@str) &gt; 0 and joinexp &lt;&gt;&#8221;</p>
<p>Select @str</p></blockquote>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Create+dynamic+query+with+dynamic+joins+http://z3f6q.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Create+dynamic+query+with+dynamic+joins+http://z3f6q.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=656&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/write-query-to-get-custom-results.html' rel='bookmark' title='Permanent Link: Write query to get custom results'>Write query to get custom results</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-the-syntax-required-for-the-creation-of-a-cursor.html' rel='bookmark' title='Permanent Link: What is the syntax required for the creation of a cursor?'>What is the syntax required for the creation of a cursor?</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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[CSharp]]></category>
		<category><![CDATA[Company asked interview questions]]></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/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>
<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/csharp-interview-questions/how-do-you-inherit-from-a-class-in-c.html' rel='bookmark' title='Permanent Link: How do you inherit from a class in c#?'>How do you inherit from a class in c#?</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>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Can+I+inherit+two+difference+classes+to+partial+classes%3F+http://bmfwe.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.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://bmfwe.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html" rel="bookmark" class="wherego_title">Can we store filtered DataView in ViewState?</a></li><li><a href="http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html" rel="bookmark" class="wherego_title">What is differance between Abstract and Interface</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" class="wherego_title">When you inherit a protected-class-level variable,who is it available to?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></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/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>
<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/csharp-interview-questions/how-do-you-inherit-from-a-class-in-c.html' rel='bookmark' title='Permanent Link: How do you inherit from a class in c#?'>How do you inherit from a class in c#?</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>
		<item>
		<title>Can we store filtered DataView in ViewState?</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html#comments</comments>
		<pubDate>Mon, 25 Jan 2010 13:16:05 +0000</pubDate>
		<dc:creator>smartbrain</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Microsoft .Net]]></category>
		<category><![CDATA[dataview]]></category>
		<category><![CDATA[interview questions]]></category>
		<category><![CDATA[microsoft interview questions]]></category>
		<category><![CDATA[Viewstate]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=643</guid>
		<description><![CDATA[The question is asked in RSystems, Noida and I am sharing the same with you, my asnwer is as follows, if anyone have idea or more depth in answer please share where:
We can store only objects of the following types:
1. string
2. integers
3. boolean
4. Array
5. ArrayList
6. Hash tables
7. Custom types etc.
Apart from above we can share some other types too but the class must be serialized.
In view of above theory, we can say &#8216;yes, we can store DataView in ViewState for serialized class.
 Tweet This PostReaders who viewed this page, also ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html' rel='bookmark' title='Permanent Link: Can I inherit two difference classes to partial classes?'>Can I inherit two difference classes to partial classes?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-a-declarations-generator-dclgen.html' rel='bookmark' title='Permanent Link: What is a Declarations Generator (DCLGEN)?'>What is a Declarations Generator (DCLGEN)?</a></li>
<li><a href='http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html' rel='bookmark' title='Permanent Link: What is differance between Abstract and Interface'>What is differance between Abstract and Interface</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">The question is asked in <strong>RSystems, Noida</strong> and I am sharing the same with you, my asnwer is as follows, if anyone have idea or more depth in answer please share where:</div>
<div id="_mcePaste">We can store only objects of the following types:</div>
<div id="_mcePaste">1. string</div>
<div id="_mcePaste">2. integers</div>
<div id="_mcePaste">3. boolean</div>
<div id="_mcePaste">4. Array</div>
<div id="_mcePaste">5. ArrayList</div>
<div id="_mcePaste">6. Hash tables</div>
<div id="_mcePaste">7. Custom types etc.</div>
<div id="_mcePaste">Apart from above we can share some other types too but the class must be serialized.</div>
<div id="_mcePaste">In view of above theory, we can say &#8216;yes, we can store DataView in ViewState for serialized class.</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Can+we+store+filtered+DataView+in+ViewState%3F+http://7m475.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Can+we+store+filtered+DataView+in+ViewState%3F+http://7m475.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-a-tablespace.html" rel="bookmark" class="wherego_title">What is a tablespace?</a></li><li><a href="http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html" rel="bookmark" class="wherego_title">What is differance between Abstract and Interface</a></li><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html" rel="bookmark" class="wherego_title">Can I inherit two difference classes to partial classes?</a></li><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-a-declarations-generator-dclgen.html" rel="bookmark" class="wherego_title">What is a Declarations Generator (DCLGEN)?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=643&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/asp-net-interview-questions/can-i-inherit-two-difference-classes-to-partial-classes.html' rel='bookmark' title='Permanent Link: Can I inherit two difference classes to partial classes?'>Can I inherit two difference classes to partial classes?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-db2-question-answer/what-is-a-declarations-generator-dclgen.html' rel='bookmark' title='Permanent Link: What is a Declarations Generator (DCLGEN)?'>What is a Declarations Generator (DCLGEN)?</a></li>
<li><a href='http://interview.msdotnetheaven.com/oops-questions-and-answers/what-is-differance-between-abstract-and-interface.html' rel='bookmark' title='Permanent Link: What is differance between Abstract and Interface'>What is differance between Abstract and Interface</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/can-we-store-filtered-dataview-in-viewstate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I get the date of Last Monday of specified week?</title>
		<link>http://interview.msdotnetheaven.com/database-question-answer/how-can-i-get-the-date-of-last-monday-of-specified-week.html</link>
		<comments>http://interview.msdotnetheaven.com/database-question-answer/how-can-i-get-the-date-of-last-monday-of-specified-week.html#comments</comments>
		<pubDate>Fri, 22 Jan 2010 16:50:47 +0000</pubDate>
		<dc:creator>smartbrain</dc:creator>
				<category><![CDATA[Database Questions]]></category>
		<category><![CDATA[MsSql Server]]></category>
		<category><![CDATA[sql interview question]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=640</guid>
		<description><![CDATA[The query is asked in my recent interview and the same I want to share with you. If anyone has better solution(corrected by Sandeep Walia)  please share here:
declare @dt datetime
set @dt=&#8217;1/1/2010&#8242; &#8211;Want to know January&#8217;s Last Monday Date
SELECT dateadd(d,-datepart(dw,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt))-1)+1,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt)))
 Tweet This PostReaders who viewed this page, also viewed:Create dynamic query with dynamic joinsChange date format mm/dd/yy to dd/mm/yy using query?Powered by Where did they go from here?

Related posts:Change date format mm/dd/yy to dd/mm/yy using query?
Create dynamic query with dynamic joins
Interview Questions DB2 : Part &#8211; II



Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html' rel='bookmark' title='Permanent Link: Create dynamic query with dynamic joins'>Create dynamic query with dynamic joins</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/interview-questions-db2-part-ii.html' rel='bookmark' title='Permanent Link: Interview Questions DB2 : Part &#8211; II'>Interview Questions DB2 : Part &#8211; II</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The query is asked in my recent interview and the same I want to share with you. If anyone has better solution(corrected by Sandeep Walia)  please share here:</p>
<blockquote><p>declare @dt datetime</p>
<p>set @dt=&#8217;1/1/2010&#8242; &#8211;Want to know January&#8217;s Last Monday Date</p>
<p>SELECT dateadd(d,-datepart(dw,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt))-1)+1,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt)))</p></blockquote>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=How+can+I+get+the+date+of+Last+Monday+of+specified+week%3F+http://o7sci.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=How+can+I+get+the+date+of+Last+Monday+of+specified+week%3F+http://o7sci.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html" rel="bookmark" class="wherego_title">Create dynamic query with dynamic joins</a></li><li><a href="http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html" rel="bookmark" class="wherego_title">Change date format mm/dd/yy to dd/mm/yy using query?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=640&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/database-question-answer/mssql-question-answer/change-date-format-mmddyy-to-ddmmyy-using-query.html' rel='bookmark' title='Permanent Link: Change date format mm/dd/yy to dd/mm/yy using query?'>Change date format mm/dd/yy to dd/mm/yy using query?</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/create-dynamic-query-with-dynamic-joins.html' rel='bookmark' title='Permanent Link: Create dynamic query with dynamic joins'>Create dynamic query with dynamic joins</a></li>
<li><a href='http://interview.msdotnetheaven.com/database-question-answer/interview-questions-db2-part-ii.html' rel='bookmark' title='Permanent Link: Interview Questions DB2 : Part &#8211; II'>Interview Questions DB2 : Part &#8211; II</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/database-question-answer/how-can-i-get-the-date-of-last-monday-of-specified-week.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I create a Singleton class by using public constructor?</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html#comments</comments>
		<pubDate>Mon, 11 Jan 2010 15:39:23 +0000</pubDate>
		<dc:creator>meghna</dc:creator>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Microsoft .Net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Interview question]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=633</guid>
		<description><![CDATA[I have also asked a tricky question like this:
Can we create a singleton class using public constructor?
Simply answer is yes.
Practically, many of us aware that we can create a singleton class by using private constructor an creating a property, but we can create a singleton class by using public constructor as folows:
static void Main(string[] args)
{
try
{
Singleton obj3 = new Singleton2();
Singleton obj4 = new Singleton2();
Console.Read();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Console.Read();
}
}
static void Main(string[] args)
{
try
{
Singleton obj3 = new Singleton2();
Singleton obj4 = new Singleton2();
Console.Read();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Console.Read();
}
}
 Tweet This PostReaders who viewed this page, also viewed:What is a Lambda ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/general-interview-stuffs/is-it-possible-to-create-constructor-for-an-abstract-class.html' rel='bookmark' title='Permanent Link: Is it possible to create constructor for an Abstract class?'>Is it possible to create constructor for an Abstract class?</a></li>
<li><a href='http://interview.msdotnetheaven.com/crystal-report/difference-between-clone-close-and-dispose-methods-of-crystal-report.html' rel='bookmark' title='Permanent Link: Difference between Clone, Close and Dispose methods of Crystal Report?'>Difference between Clone, Close and Dispose methods of Crystal Report?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html' rel='bookmark' title='Permanent Link: Define Lambda expressions'>Define Lambda expressions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have also asked a tricky question like this:</p>
<p>Can we create a singleton class using public constructor?</p>
<p><span style="text-decoration: underline;">Simply answer is yes.</span></p>
<p>Practically, many of us aware that we can create a singleton class by using private constructor an creating a property, but we can create a singleton class by using public constructor as folows:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">static void Main(string[] args)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Singleton obj3 = new Singleton2();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Singleton obj4 = new Singleton2();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Console.Read();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Console.WriteLine(ex.ToString());</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Console.Read();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<blockquote><p>static void Main(string[] args)</p>
<p>{</p>
<p>try</p>
<p>{</p>
<p>Singleton obj3 = new Singleton2();</p>
<p>Singleton obj4 = new Singleton2();</p>
<p>Console.Read();</p>
<p>}</p>
<p>catch (Exception ex)</p>
<p>{</p>
<p>Console.WriteLine(ex.ToString());</p>
<p>Console.Read();</p>
<p>}</p>
<p>}</p></blockquote>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=How+can+I+create+a+Singleton+class+by+using+public+constructor%3F+http://rb3fa.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=How+can+I+create+a+Singleton+class+by+using+public+constructor%3F+http://rb3fa.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html" rel="bookmark" class="wherego_title">What is a Lambda expression?</a></li><li><a href="http://interview.msdotnetheaven.com/crystal-report/difference-between-clone-close-and-dispose-methods-of-crystal-report.html" rel="bookmark" class="wherego_title">Difference between Clone, Close and Dispose methods of Crystal Report?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=633&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/general-interview-stuffs/is-it-possible-to-create-constructor-for-an-abstract-class.html' rel='bookmark' title='Permanent Link: Is it possible to create constructor for an Abstract class?'>Is it possible to create constructor for an Abstract class?</a></li>
<li><a href='http://interview.msdotnetheaven.com/crystal-report/difference-between-clone-close-and-dispose-methods-of-crystal-report.html' rel='bookmark' title='Permanent Link: Difference between Clone, Close and Dispose methods of Crystal Report?'>Difference between Clone, Close and Dispose methods of Crystal Report?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html' rel='bookmark' title='Permanent Link: Define Lambda expressions'>Define Lambda expressions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Define Lambda expressions</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 13:55:02 +0000</pubDate>
		<dc:creator>smartbrain</dc:creator>
				<category><![CDATA[LINQ]]></category>
		<category><![CDATA[interview questions]]></category>
		<category><![CDATA[Lambda Expression]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=622</guid>
		<description><![CDATA[A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as &#8216;goes to&#8217; operator.
Left side of this operator specifies the input parameters and contains the expression or statement block at the right side. 
Example: myExp = myExp/10; 
Now, let see how we can assign the above to a delegate and create an expression tree: 
delegate int myDel(int intMyNum);
        ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html' rel='bookmark' title='Permanent Link: What is a Lambda expression?'>What is a Lambda expression?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html' rel='bookmark' title='Permanent Link: What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?'>What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A <strong>Lambda expression</strong> is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as &#8216;goes to&#8217; operator.</p>
<p>Left side of this operator specifies the input parameters and contains the expression or statement block at the right side. </p>
<p><strong>Example: </strong>myExp = myExp/10; </p>
<p>Now, let see how we can assign the above to a delegate and create an expression tree: </p>
<p><code>delegate int myDel(int intMyNum);<br />
        static void Main(string[] args)<br />
        {<br />
            //assign lambda expression to a delegate:<br />
            myDel myDelegate = myExp =&gt; myExp / 10;<br />
            int intRes = myDelegate(110);<br />
            Console.WriteLine("Output {0}", intRes);<br />
            Console.ReadLine();<br />
            //Create an expression tree type<br />
            //This needs System.Linq.Expressions<br />
            Expression&lt;myDel&gt; myExpDel = myExp =&gt; myExp /10;<br />
        }</code></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Define+Lambda+expressions+http://y7abr.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Define+Lambda+expressions+http://y7abr.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html" rel="bookmark" class="wherego_title">What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html" rel="bookmark" class="wherego_title">What is a Lambda expression?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=622&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html' rel='bookmark' title='Permanent Link: What is a Lambda expression?'>What is a Lambda expression?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html' rel='bookmark' title='Permanent Link: What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?'>What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I insert hyperlinks in ListBox?</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-insert-hyperlinks-in-listbox.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-insert-hyperlinks-in-listbox.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 05:53:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Microsoft .Net]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[TCS Interview]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/index.php/mainframe-question-and-answers/mainframe-vsam-question-answer/how-can-i-insert-hyperlinks-in-listbox/</guid>
		<description><![CDATA[Its can&#8217;t possible adding hyperlinks/links to listbox.
Its just a collection items not child items and are not render while anyone put some html tags. So, its not possible
 Tweet This PostReaders who viewed this page, also viewed:Describe the DD statement, its meaning, syntax and keywords?What is cross page posting?What does the INITIALIZE verb do?  &#8211; GSPowered by Where did they go from here?

Related posts:What is cross page posting?
Describe the DD statement, its meaning, syntax and keywords?
What does the keyword DCB mean and what are some of the keywords associated ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/what-is-cross-page-posting.html' rel='bookmark' title='Permanent Link: What is cross page posting?'>What is cross page posting?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/describe-the-dd-statement-its-meaning-syntax-and-keywords.html' rel='bookmark' title='Permanent Link: Describe the DD statement, its meaning, syntax and keywords?'>Describe the DD statement, its meaning, syntax and keywords?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-does-the-keyword-dcb-mean-and-what-are-some-of-the-keywords-associated-with-it.html' rel='bookmark' title='Permanent Link: What does the keyword DCB mean and what are some of the keywords associated with it?'>What does the keyword DCB mean and what are some of the keywords associated with it?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Its can&#8217;t possible adding hyperlinks/links to listbox.</p>
<p>Its just a collection items not child items and are not render while anyone put some html tags. So, its not possible</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=How+can+I+insert+hyperlinks+in+ListBox%3F+http://cmrn2.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=How+can+I+insert+hyperlinks+in+ListBox%3F+http://cmrn2.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/describe-the-dd-statement-its-meaning-syntax-and-keywords.html" rel="bookmark" class="wherego_title">Describe the DD statement, its meaning, syntax and keywords?</a></li><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/what-is-cross-page-posting.html" rel="bookmark" class="wherego_title">What is cross page posting?</a></li><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-cobol-question-answer/what-does-the-initialize-verb-do-gs.html" rel="bookmark" class="wherego_title">What does the INITIALIZE verb do?  &#8211; GS</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=620&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/what-is-cross-page-posting.html' rel='bookmark' title='Permanent Link: What is cross page posting?'>What is cross page posting?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/describe-the-dd-statement-its-meaning-syntax-and-keywords.html' rel='bookmark' title='Permanent Link: Describe the DD statement, its meaning, syntax and keywords?'>Describe the DD statement, its meaning, syntax and keywords?</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-does-the-keyword-dcb-mean-and-what-are-some-of-the-keywords-associated-with-it.html' rel='bookmark' title='Permanent Link: What does the keyword DCB mean and what are some of the keywords associated with it?'>What does the keyword DCB mean and what are some of the keywords associated with it?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-insert-hyperlinks-in-listbox.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is a Lambda expression?</title>
		<link>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html</link>
		<comments>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 12:51:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Expression tree]]></category>
		<category><![CDATA[Lambda Expression]]></category>

		<guid isPermaLink="false">http://interview.msdotnetheaven.com/?p=618</guid>
		<description><![CDATA[A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator =&#62; and read as &#8216;goes to&#8217; operator.
Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.
Example: myExp = myExp/10;
Now, let see how we can assign the above to a delegate and create an expression tree:
delegate int myDel(int intMyNum);
static void Main(string[] args)
{
//assign lambda expression to a delegate:
myDel myDelegate = ...


Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html' rel='bookmark' title='Permanent Link: Define Lambda expressions'>Define Lambda expressions</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html' rel='bookmark' title='Permanent Link: What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?'>What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html' rel='bookmark' title='Permanent Link: How can I create a Singleton class by using public constructor?'>How can I create a Singleton class by using public constructor?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator =&gt; and read as &#8216;goes to&#8217; operator.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Example: myExp = myExp/10;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Now, let see how we can assign the above to a delegate and create an expression tree:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">delegate int myDel(int intMyNum);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">static void Main(string[] args)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">//assign lambda expression to a delegate:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">myDel myDelegate = myExp =&gt; myExp / 10;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">int intRes = myDelegate(110);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Console.WriteLine(&#8220;Output {0}&#8221;, intRes);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Console.ReadLine();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">//Create an expression tree type</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">//This needs System.Linq.Expressions</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Expression&lt;myDel&gt; myExpDel = myExp =&gt; myExp /10;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Note:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">The =&gt; operator has the same precedence as assignment (=) and is right-associative.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where.</div>
<p>A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator =&gt; and read as &#8216;goes to&#8217; operator.</p>
<p>Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.</p>
<p>Example: Â myExp = myExp/10;</p>
<p>Now, let see how we can assign the above to a delegate and create an expression tree:</p>
<blockquote><p>delegate int myDel(int intMyNum);</p>
<p>static void Main(string[] args)</p>
<p>{</p>
<p>//assign lambda expression to a delegate:</p>
<p>myDel myDelegate = myExp =&gt; myExp / 10;</p>
<p>int intRes = myDelegate(110);</p>
<p>Console.WriteLine(&#8220;Output {0}&#8221;, intRes);</p>
<p>Console.ReadLine();</p>
<p>//Create an expression tree type</p>
<p>//This needs System.Linq.Expressions</p>
<p>Expression&lt;myDel&gt; myExpDel = myExp =&gt; myExp /10;</p>
<p>}</p></blockquote>
<p><strong><span style="text-decoration: underline;">Note:</span></strong></p>
<p>The =&gt; operator has the same precedence as assignment (=) and is right-associative.</p>
<p>Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=What+is+a+Lambda+expression%3F+http://hme4b.th8.us" title="Post to Twitter"><img class="nothumb" src="http://interview.msdotnetheaven.com/wp-content/plugins/tweet-this/icons/de/tt-twitter-micro4-de.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=What+is+a+Lambda+expression%3F+http://hme4b.th8.us" title="Post to Twitter">Tweet This Post</a></p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html" rel="bookmark" class="wherego_title">How can I create a Singleton class by using public constructor?</a></li><li><a href="http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html" rel="bookmark" class="wherego_title">Define Lambda expressions</a></li><li><a href="http://interview.msdotnetheaven.com/oops-questions-and-answers/can-you-declare-the-override-method-static-while-the-original-method-is-non-static.html" rel="bookmark" class="wherego_title">Can you declare the override method static while the original method is non-static?</a></li><li><a href="http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html" rel="bookmark" class="wherego_title">What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div><img src="http://interview.msdotnetheaven.com/?ak_action=api_record_view&id=618&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/define-lambda-expressions.html' rel='bookmark' title='Permanent Link: Define Lambda expressions'>Define Lambda expressions</a></li>
<li><a href='http://interview.msdotnetheaven.com/mainframe-question-and-answers/mainframe-jcl-question-answer/what-is-the-meaning-of-data-definition-name-ddname-and-dataset-name-dsname-in-the-dd-statement.html' rel='bookmark' title='Permanent Link: What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?'>What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?</a></li>
<li><a href='http://interview.msdotnetheaven.com/microsoft-net-interview-questions/how-can-i-create-a-singleton-class-by-using-public-constructor.html' rel='bookmark' title='Permanent Link: How can I create a Singleton class by using public constructor?'>How can I create a Singleton class by using public constructor?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://interview.msdotnetheaven.com/microsoft-net-interview-questions/linq/what-is-a-lambda-expression.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
