KyaPoocha.com

Huge Collection of Interview Questions


Archive for August, 2006

What size is a .NET object? 

Each instance of a reference type has two fields maintained by the runtime - a method table pointer and a sync block. These are 4 bytes each on a 32-bit system,... Read more »

What is the difference between an event and a delegate? 

An event is just a wrapper for a multicast delegate. Adding a public event to a class is almost the same as adding a public multicast delegate field. In both cases,... Read more »

How does .NET remoting work? 

.NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is intended for LANs only - HTTP can be used for LANs... Read more »

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... Read more »

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... Read more »

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... Read more »

How does CAS work? 

The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code... Read more »

What is Code Access Security (CAS)? 

CAS is the part of the .NET security model that determines whether or not code is allowed to run, and what resources it can use when it is running. For example,... Read more »

What is the lapsed listener problem? 

The lapsed listener problem is one of the primary causes of leaks in .NET applications. It occurs when a subscriber (or ‘listener’) signs up for a publisher’s... Read more »

How can I find out what the garbage collector is doing? 

Lots of interesting statistics are exported from the .NET runtime via the ‘.NET CLR xxx’ performance counters. Use Performance Monitor to view them.  Read more »

Do I have any control over the garbage collection algorithm? 

A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately. Also there... Read more »

What is garbage collection? 

Garbage collection is a heap-management strategy where a run-time component takes responsibility for managing the lifetime of the memory used by objects. This concept... Read more »

What is an application domain? 

An AppDomain can be thought of as a lightweight process. Multiple AppDomains can exist inside a Win32 process. The primary purpose of the AppDomain is to isolate... Read more »

How does assembly versioning work? 

Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version... Read more »

How do assemblies find each other? 

By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private... Read more »

Page 5 of 16« First...«34567»...Last »