• +91 9971497814
  • info@interviewmaterial.com

DotNet Interview Questions Answers

Question 1 : What’s a Windows process?

Answer 1 : It’s an application that’s running and had been allocated memory.

Question 2 :   Can a nested object be used in Serialization ?

Answer 2 :   Yes. If a class that is to be serialized contains references to objects of other classes, and if those classes have been marked as serializable, then their objects are serialized too.

Question 3 :   Can the validation be done in the server side? Or this can be done only in the Client side?

Answer 3 :   Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.

Question 4 :   Changes to which portion of version number indicates an incompatible change?

Answer 4 :   Major or minor. Changes to the major or minor portion of the version number indicate an incompatible change. Under this convention then, version would be considered incompatible with version Examples of an incompatible change would be a change to the types of some method parameters or the removal of a type or method altogether. Build. The Build number is typically used to distinguish between daily builds or smaller compatible releases. Revision. Changes to the revision number are typically reserved for an incremental build needed to fix a particular bug. You'll sometimes hear this referred to as the "emergency bug fix" number in that the revision is what is often changed when a fix to a specific bug is shipped to a customer.

Question 5 :   Describe the difference between a Thread and a Process?

Answer 5 :   A Process is an instance of an running application. And a thread is the Execution stream of the Process. A process can have multiple Thread. When a process starts a specific memory area is allocated to it. When there is multiple thread in a process, each thread gets a memory for storing the variables in it and plus they can access to the global variables which is common for all the thread. Eg.A Microsoft Word is a Application. When you open a word file,an instance of the Word starts and a process is allocated to this instance which has one thread.

Question 6 :   Difference between Dispose and Finallize method?

Answer 6 :   Finalize method is used to free the memory used by some unmanaged resources like window handles (HWND). It's similar to the destructor syntax in C#. The GC calls this method when it founds no more references to the object. But, In some cases we may need release the memory used by the resources explicitely.To release the memory explicitly we need to implement the Dispose method of IDisposable interface.

Question 7 :   Difference between int and int32 ?

Answer 7 :   Both are same. System.Int32 is a .NET class. Int is an alias name for System.Int32.

Question 8 :   How can you prevent your class to be inherated further?

Answer 8 :    By setting Sealed - Key word  public sealed class Planet  {              //code goes here  } class Moon:Planet  {      //Not allowed as base class is sealed  }

Question 9 :   How do you convert a value-type to a reference-type?

Answer 9 : Use Boxing.

Question 10 :   How is a strongly-named assembly different from one that isn’t strongly-named?

Answer 10 :   Strong names are used to enable the stricter naming requirements associated with shared assemblies. These strong names are created by a .NET utility – sn.exe Strong names have three goals: · Name uniqueness. Shared assemblies must have names that are globally unique. · Prevent name spoofing. Developers don't want someone else releasing a subsequent version of one of your assemblies and falsely claim it came from you, either by accident or intentionally. · Provide identity on reference. When resolving a reference to an assembly, strong names are used to guarantee the assembly that is loaded came from the expected publisher. Strong names are implemented using standard public key cryptography. In general, the process works as follows: The author of an assembly generates a key pair (or uses an existing one), signs the file containing the manifest with the private key, and makes the public key available to callers. When references are made to the assembly,

DotNet Contributors


Share your email for latest updates


Our partners