Logo 
Search:

c programming Interview FAQs

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

Should I use ReaderWriterLock instead of Monitor.Enter/Exit?

Maybe, but be careful. ReaderWriterLock is used to allow multiple threads to read from a data source, while still granting exclusive access to a single writer thread. This makes sense for data access that is mostly read-only, but there are some cavea...
Posted By:Oliver Evans      Posted On: Feb 04

.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

Should I use ReaderWriterLock instead of Monitor.Enter/Exit?

Maybe, but be careful. ReaderWriterLock is used to allow multiple threads to read from a data source, while still granting exclusive access to a single writer thread. This makes sense for data access that is mostly read-only, but there are some cavea...
Posted By:Oliver Evans      Posted On: Feb 04

.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

  47  48  49  50  51  52  53  54  55  56  57