Logo 
Search:

c sharp Interview FAQs

Submit Interview FAQ
No Records Found!!!
Go Ahead and Post your Interview FAQ
Home » Interview FAQs » c sharpRSS Feeds
.Net Framework
Comments: 0

Is there built-in support for tracing/logging?

Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defin...
Posted By:Geb Chalthoum       Posted On: Sep 19

.Net Framework
Comments: 0

How do I stop a thread?

There are several options. First, you can use your own communication mechanism to tell the ThreadStart method to finish. Alternatively the Thread class has in-built support for instructing the thread to stop. The two principle methods are Thread.Inte...
Posted By:Corinne Rogers      Posted On: Nov 06

.Net Framework
Comments: 0

How do I use the thread pool?

By passing an instance of a WaitCallback delegate to the ThreadPool.QueueUserWorkItem() method

class CApp
{
static void Main()
{
string s = "Hello, World";
ThreadPool.QueueUserWorkItem( new Wait...
Posted By:Agatha Miller      Posted On: Jan 16

.Net Framework
Comments: 0

How do I know when my thread pool work item has completed?

There is no way to query the thread pool for this information. You must put code into the WaitCallback method to signal that it has completed. Events are useful for this.
Posted By:Sonya Flores      Posted On: Nov 20

.Net Framework
Comments: 0

Is ATL redundant in the .NET world?

Yes. ATL will continue to be valuable for writing COM components for some time, but it has no place in the .NET world.
Posted By:Estella Mitchell      Posted On: Feb 07

.Net Framework
Comments: 0

How do I spawn a thread?

Create an instance of a System.Threading.Thread object, passing it an instance of a ThreadStart delegate that will be executed on the new thread. For example:

class MyThread
{
public MyThread( string initData )
{
...
Posted By:Felicia Hill      Posted On: Mar 02

.Net Framework
Comments: 0

Is there built-in support for tracing/logging?

Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defin...
Posted By:Geb Chalthoum       Posted On: Sep 19

.Net Framework
Comments: 0

How do I stop a thread?

There are several options. First, you can use your own communication mechanism to tell the ThreadStart method to finish. Alternatively the Thread class has in-built support for instructing the thread to stop. The two principle methods are Thread.Inte...
Posted By:Corinne Rogers      Posted On: Nov 06

.Net Framework
Comments: 0

How do I use the thread pool?

By passing an instance of a WaitCallback delegate to the ThreadPool.QueueUserWorkItem() method

class CApp
{
static void Main()
{
string s = "Hello, World";
ThreadPool.QueueUserWorkItem( new Wait...
Posted By:Agatha Miller      Posted On: Jan 16

.Net Framework
Comments: 0

How do I know when my thread pool work item has completed?

There is no way to query the thread pool for this information. You must put code into the WaitCallback method to signal that it has completed. Events are useful for this.
Posted By:Sonya Flores      Posted On: Nov 20

.Net Framework
Comments: 0

Is ATL redundant in the .NET world?

Yes. ATL will continue to be valuable for writing COM components for some time, but it has no place in the .NET world.
Posted By:Estella Mitchell      Posted On: Feb 07

.Net Framework
Comments: 0

How do I spawn a thread?

Create an instance of a System.Threading.Thread object, passing it an instance of a ThreadStart delegate that will be executed on the new thread. For example:

class MyThread
{
public MyThread( string initData )
{
...
Posted By:Felicia Hill      Posted On: Mar 02

  47  48  49  50  51  52  53  54  55  56  57