- What is the difference between CONST and READONLY?
Both are meant for constant values. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used.
readonly int b;
public X()
{
b=1;
}
public X(string s)
{
b=5;
}
public X(string s, int i)
{
b=i;
}
Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants, as in the following example:
public static readonly uint l1 = (uint) DateTime.Now.Ticks;
(this can't be possible with const) - What is the difference between ref & out parameters?
An argument passed to a ref parameter must first be initialized. Compare this to an out parameter, whose argument does not have to be explicitly initialized before being passed to an out parameter. - What is the difference between Array and LinkedList?
- What is the difference between Array and Arraylist?
As elements are added to an ArrayList, the capacity is automatically increased as required through reallocation. The capacity can be decreased by calling TrimToSize or by setting the Capacity property explicitly. - What is Jagged Arrays?
A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an "array-of-arrays." - What are indexers?
Indexers are similar to properties, except that the get and set accessors of indexers take parameters, while property accessors do not. - What is Asynchronous call and how it can be implemented using delegates?
- How to create events for a control? What is custom events? How to create it?
- If you want to write your own dot net language, what steps you will u take care?
- Describe the difference between inline and code behind - which is best in a loosely coupled solution?
- how dot net compiled code will become platform independent?
- without modifying source code if we compile again, will it be generated MSIL again?
- C++ & C# differences
- Interop Services?
The common language runtime provides two mechanisms for interoperating with unmanaged code:
- Platform invoke, which enables managed code to call functions exported from an unmanaged library.
- COM interop, which enables managed code to interact with COM objects through interfaces.
Both platform invoke and COM interop use interop marshaling to accurately move method arguments between caller and callee and back, if required.
- How does u handle this COM components developed in other programming languages in .NET?
- What is RCW (Runtime Callable Wrappers)?
The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object. - What is CCW (COM Callable Wrapper)
A proxy object generated by the common language runtime so that existing COM applications can use managed classes, including .NET Framework classes, transparently.
- How CCW and RCW is working?
- How will you register com+ services?
The .NET Framework SDK provides the .NET Framework Services Installation Tool (Regsvcs.exe - a command-line tool) to manually register an assembly containing serviced components. You can also access these registration features programmatically with the System.EnterpriseServicesRegistrationHelper class by creating an instance of class RegistrationHelper and using the method InstallAssembly
ContextUtil is the preferred class to use for obtaining COM+ context information.
No comments:
Post a Comment