<?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"
	>

<channel>
	<title>Technical Interview Questions &#187; C# Interview Questions</title>
	<atom:link href="http://www.technicalinterview.info/category/c-interview-questions-3/feed" rel="self" type="application/rss+xml" />
	<link>http://www.technicalinterview.info</link>
	<description>Java Interview Questions &#124; IT interview questions &#124; Software Testing Interview questions &#124; .Net Interview Questions &#124; Job Interview Questions &#38; Answers &#124; Tough Interview Questions &#124; Technology Interview Questions &#124; Tech Interview Questions &#124; Testing Interview Questions &#124; SAP Interview Questions &#124; ABAP Interview Questions &#124; Data Warehousing Interview Questions</description>
	<pubDate>Wed, 06 Aug 2008 17:02:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?</title>
		<link>http://www.technicalinterview.info/is-it-possible-to-restrict-the-scope-of-a-fieldmethod-of-a-class-to-the-classes-in-the-same-namespace/</link>
		<comments>http://www.technicalinterview.info/is-it-possible-to-restrict-the-scope-of-a-fieldmethod-of-a-class-to-the-classes-in-the-same-namespace/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:43:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-it-possible-to-restrict-the-scope-of-a-fieldmethod-of-a-class-to-the-classes-in-the-same-namespace.html</guid>
		<description><![CDATA[There is no way to restrict to a namespace. Namespaces are never units of  protection. But if you’re using assemblies, you can use the ‘internal’ access  modifier to restrict access to only within the assembly.
]]></description>
			<content:encoded><![CDATA[<p>There is no way to restrict to a namespace. Namespaces are never units of  protection. But if you’re using assemblies, you can use the ‘internal’ access  modifier to restrict access to only within the assembly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-it-possible-to-restrict-the-scope-of-a-fieldmethod-of-a-class-to-the-classes-in-the-same-namespace/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is there a way of specifying which block or loop to break out of when working with nested loops?</title>
		<link>http://www.technicalinterview.info/is-there-a-way-of-specifying-which-block-or-loop-to-break-out-of-when-working-with-nested-loops/</link>
		<comments>http://www.technicalinterview.info/is-there-a-way-of-specifying-which-block-or-loop-to-break-out-of-when-working-with-nested-loops/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:43:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-there-a-way-of-specifying-which-block-or-loop-to-break-out-of-when-working-with-nested-loops.html</guid>
		<description><![CDATA[The easiest way is to use goto:
using System;
class BreakExample
{
public static void Main(String[] args) {
for(int i=0; i]]></description>
			<content:encoded><![CDATA[<p>The easiest way is to use goto:</p>
<p>using System;<br />
class BreakExample<br />
{<br />
public static void Main(String[] args) {<br />
for(int i=0; i<3; i++)<br />
{<br />
Console.WriteLine(\&#8221;Pass {0}: \&#8221;, i);<br />
for( int j=0 ; j<100 ; j++ )<br />
{<br />
if ( j == 10)<br />
goto done;<br />
Console.WriteLine(\&#8221;{0} \&#8221;, j);<br />
}<br />
Console.WriteLine(\&#8221;This will not print\&#8221;);<br />
}<br />
done:<br />
Console.WriteLine(\&#8221;Loops complete.\&#8221;);<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-there-a-way-of-specifying-which-block-or-loop-to-break-out-of-when-working-with-nested-loops/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is there a way to force garbage collection?</title>
		<link>http://www.technicalinterview.info/is-there-a-way-to-force-garbage-collection/</link>
		<comments>http://www.technicalinterview.info/is-there-a-way-to-force-garbage-collection/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:43:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-there-a-way-to-force-garbage-collection.html</guid>
		<description><![CDATA[Yes. Set all references to null and then call System.GC.Collect(). If you need  to have some objects destructed, and System.GC.Collect() doesn’t seem to be  doing it for you, you can force finalizers to be run by setting all the  references to the object to null and then calling System.GC.RunFinalizers().
]]></description>
			<content:encoded><![CDATA[<p>Yes. Set all references to null and then call System.GC.Collect(). If you need  to have some objects destructed, and System.GC.Collect() doesn’t seem to be  doing it for you, you can force finalizers to be run by setting all the  references to the object to null and then calling System.GC.RunFinalizers().</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-there-a-way-to-force-garbage-collection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is there an equivalent of exit() for quitting a C# .NET application?</title>
		<link>http://www.technicalinterview.info/is-there-an-equivalent-of-exit-for-quitting-a-c-net-application/</link>
		<comments>http://www.technicalinterview.info/is-there-an-equivalent-of-exit-for-quitting-a-c-net-application/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:42:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-there-an-equivalent-of-exit-for-quitting-a-c-net-application.html</guid>
		<description><![CDATA[Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app.
]]></description>
			<content:encoded><![CDATA[<p>Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-there-an-equivalent-of-exit-for-quitting-a-c-net-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is there any sample C# code for simple threading?</title>
		<link>http://www.technicalinterview.info/is-there-any-sample-c-code-for-simple-threading/</link>
		<comments>http://www.technicalinterview.info/is-there-any-sample-c-code-for-simple-threading/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:41:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-there-any-sample-c-code-for-simple-threading.html</guid>
		<description><![CDATA[Yes:
using System;
using System.Threading;
class ThreadTest
{
public void runme()
{
Console.WriteLine(\&#8221;Runme Called\&#8221;);
}
public static void Main(String[] args)
{
ThreadTest b = new ThreadTest();
Thread t = new Thread(new ThreadStart(b.runme));
t.Start();
}
}
]]></description>
			<content:encoded><![CDATA[<p>Yes:</p>
<p>using System;<br />
using System.Threading;<br />
class ThreadTest<br />
{<br />
public void runme()<br />
{<br />
Console.WriteLine(\&#8221;Runme Called\&#8221;);<br />
}<br />
public static void Main(String[] args)<br />
{<br />
ThreadTest b = new ThreadTest();<br />
Thread t = new Thread(new ThreadStart(b.runme));<br />
t.Start();<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-there-any-sample-c-code-for-simple-threading/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is there regular expression (regex) support available to C# developers?</title>
		<link>http://www.technicalinterview.info/is-there-regular-expression-regex-support-available-to-c-developers/</link>
		<comments>http://www.technicalinterview.info/is-there-regular-expression-regex-support-available-to-c-developers/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:41:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/is-there-regular-expression-regex-support-available-to-c-developers.html</guid>
		<description><![CDATA[Yes. The .NET class libraries provide support for regular expressions. Look at  the System.Text.RegularExpressions namespace.
]]></description>
			<content:encoded><![CDATA[<p>Yes. The .NET class libraries provide support for regular expressions. Look at  the System.Text.RegularExpressions namespace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/is-there-regular-expression-regex-support-available-to-c-developers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My switch statement works differently than in C++! Why?</title>
		<link>http://www.technicalinterview.info/my-switch-statement-works-differently-than-in-c-why/</link>
		<comments>http://www.technicalinterview.info/my-switch-statement-works-differently-than-in-c-why/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:40:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/my-switch-statement-works-differently-than-in-c-why.html</guid>
		<description><![CDATA[C# does not support an explicit fall through for case blocks. The following  code is not legal and will not compile in C#:
switch(x)
{
case 0: // do something
case 1: // do something as continuation of case 0
default: // do something in common with
//0, 1 and everything else
break;
}
To achieve the same effect in C#, the code [...]]]></description>
			<content:encoded><![CDATA[<p>C# does not support an explicit fall through for case blocks. The following  code is not legal and will not compile in C#:</p>
<p>switch(x)<br />
{<br />
case 0: // do something<br />
case 1: // do something as continuation of case 0<br />
default: // do something in common with<br />
//0, 1 and everything else<br />
break;<br />
}</p>
<p>To achieve the same effect in C#, the code must be modified as shown below  (notice how the control flows are explicit):</p>
<p>class Test<br />
{<br />
public static void Main() {<br />
int x = 3;<br />
switch(x)<br />
{<br />
case 0: // do something<br />
goto case 1;<br />
case 1: // do something in common with 0<br />
goto default;<br />
default: // do something in common with 0, 1, and anything else<br />
break;<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/my-switch-statement-works-differently-than-in-c-why/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is the difference between a struct and a class in C#?</title>
		<link>http://www.technicalinterview.info/what-is-the-difference-between-a-struct-and-a-class-in-c/</link>
		<comments>http://www.technicalinterview.info/what-is-the-difference-between-a-struct-and-a-class-in-c/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:40:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/what-is-the-difference-between-a-struct-and-a-class-in-c.html</guid>
		<description><![CDATA[From language spec: The list of similarities between classes and structs is as  follows. Longstructs can implement interfaces and can have the same kinds of  members as classes. Structs differ from classes in several important ways;  however, structs are value types rather than reference types, and inheritance is  not supported for [...]]]></description>
			<content:encoded><![CDATA[<p>From language spec: The list of similarities between classes and structs is as  follows. Longstructs can implement interfaces and can have the same kinds of  members as classes. Structs differ from classes in several important ways;  however, structs are value types rather than reference types, and inheritance is  not supported for structs. Struct values are stored on the stack or in-line.  Careful programmers can sometimes enhance performance through judicious use of  structs. For example, the use of a struct rather than a class for a Point can  make a large difference in the number of memory allocations performed at  runtime. The program below creates and initializes an array of 100 points. With  Point implemented as a class, 101 separate objects are instantiated-one for the  array and one each for the 100 elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/what-is-the-difference-between-a-struct-and-a-class-in-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development?</title>
		<link>http://www.technicalinterview.info/what-is-the-equivalent-to-regsvr32-and-regsvr32-u-a-file-in-net-development/</link>
		<comments>http://www.technicalinterview.info/what-is-the-equivalent-to-regsvr32-and-regsvr32-u-a-file-in-net-development/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:39:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/what-is-the-equivalent-to-regsvr32-and-regsvr32-u-a-file-in-net-development.html</guid>
		<description><![CDATA[Try using RegAsm.exe. Search MSDN on Assembly Registration Tool.
]]></description>
			<content:encoded><![CDATA[<p>Try using RegAsm.exe. Search MSDN on Assembly Registration Tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/what-is-the-equivalent-to-regsvr32-and-regsvr32-u-a-file-in-net-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?</title>
		<link>http://www.technicalinterview.info/what-is-the-syntax-for-calling-an-overloaded-constructor-within-a-constructor-this-and-constructorname-does-not-compile/</link>
		<comments>http://www.technicalinterview.info/what-is-the-syntax-for-calling-an-overloaded-constructor-within-a-constructor-this-and-constructorname-does-not-compile/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 20:39:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/2007/what-is-the-syntax-for-calling-an-overloaded-constructor-within-a-constructor-this-and-constructorname-does-not-compile.html</guid>
		<description><![CDATA[The syntax for calling another constructor is as follows: class B { B(int i) { }  } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) :  this() // call C() { } public static void Main() {} }
]]></description>
			<content:encoded><![CDATA[<p>The syntax for calling another constructor is as follows: class B { B(int i) { }  } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) :  this() // call C() { } public static void Main() {} }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/what-is-the-syntax-for-calling-an-overloaded-constructor-within-a-constructor-this-and-constructorname-does-not-compile/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
