Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 18988 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > .NET Framework Interview Questions

Now you don't need go anywhere to get the best interview questions on Microsoft technology. We are trying to gather all real interview questions asked from MNCs and put them here. You can also assist us in doing so by submitting .net interview questions. These questions are generally different from certification questions however it may help you in that too.



Page copy protected against web site content infringement by Copyscape
event:

1) It is a data member of a type(class/structure)

2)It is declared inside a type(class/structure)

3) It is used to generate notifications which are then passed to methods though
delegates.

delegate:

1)It is a datatype(reference type) that holds references of methods with
some signatures.also called as function pointer.

2)It may or may not be declared inside a class.

3)It is used as the return type of an event and used in passing messages from event to methods.


event-->delegate-->method
example:
namespace dd
{
//delegate declaration
delegate void first();
class cc
{
//event declaration
public first myevent;
}
}

example 2:
button1.Click+=new EventHandler(this.button1_Click);
(Windows Applications)

Click is the event that returns an instance of the EventHandler delegate.
EventHandler delegate has the reference of button1_Click event and that
helps in the communication betwen the Click event and button1_Click method

Yes, versioning is applicable to private assemblies too

There are 2 types of versions:
1)File version
2)Assembly version

File version is the default version that is assigned to any .NET assembly

example: click a .exe and view its properties: File version would always be there

Assembly version is applicable when we create a shared assembly(assembly installed

in a GAC)


Private assemblies do not have Assembly version, but they do have File Version

It is the execution boundary within which an application runs.
Application Domain is created inside a process.
One process can have multiple Application Domains.

Example:

Consider a Remoting scenario:

2 exe's of the client and the server are communicating with each other.

2 Application Domains will be created in the process of the server.

Process: In this case, it is the executable of the Operating System that will control the interaction of the client and server exe's.
the 2 exes's run in their Application Domains that will be created in the
execution area(in the RAM) of the OS exe.


Application Domains provide the isolation of the 2 exe's(i.e. the client and the
server).

We can chain the call of constructor from child class to base class depending on our requirement. This concept makes sure that the matching base class constructor must be called based on the parameter passed to the child class constructor.

Example:

namespace ConsoleApplication1

{
class A
{
public A(){
Console.WriteLine("Constructor A.");
}
public A(string s){
Console.WriteLine("Constructor A with parameter = {0}",s);
}
public A(string s,string t){
Console.WriteLine("Constructor A with parameter = {0} & {1}", s,t);
}
}

class B:A
{
public B():base(){
Console.WriteLine("Constructor B.");
}
public B(string s):base(s){
Console.WriteLine("Constructor B with parameter = {0}", s);
}
public B(string s, string t):base(s,t){
Console.WriteLine("Constructor B with parameter = {0} & {1}", s, t);
}
}
class Program
{
static void Main(string[] args)
{
B b1 = new B();
B b2 = new B("First Parameter ", "Second Parameter");

Console.Read();
}
}
}


Output:
Constructor A.
Constructor B.
Constructor A with parameter = First Parameter & Second Parameter
Constructor B with parameter = First Parameter & Second Parameter

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

The assembly manifest is providing information to the .NET application at runtime. It provides the information like assembly's name, version, requested permissions, and other assemblies that the .NET application references.

It describes the assembly to the managed hosting environment.

It acts as a directory to the modules, types, and resources in the assembly.

The application manifest which gives information to the operating system, such as in which way the assembly should be deployed and will check whether administrative elevation is required or not.

This is processed before the .NET-managed hosting environment loads to the assembly.

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

NOTE: This is objective type question, Please click question title for correct answer.

lock keyword basically provides a shortcut to Enter method of Monitor class.
Monitor is used to provide thread synchronization.It means till the Thread in which the method is being used finishes its task, no other thread can access the object.

example:

lock (object)
{

}

It is compiled into

Monitor.Enter(object);
try
{
//code
}
finally
{
Monitor.Exit(object);
}

See the MSIL of the assembly.

We can write much more code and perform customization in the try block.

Found this useful, bookmark this page link to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape
Navigate to Page: 1 | ... | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ... | 29 |

 More Exclusive .NET Framework Interview Questions and Answers here


Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 8:38:51 PM