Refresh Me

.Net Framework

001. Architecture of .Net Framework

Microsoft's .NET Framework is comprised of two main components - the Common Language Runtime (CLR) and the .NET Framework class libraries. The CLR is the real foundation of the .NET Framework. It is the execution engine (runtime environment) for all .NET applications. Every target computer requires the CLR to successfully run a .NET application that uses the .NET Framework.

The main features of CLR include:
1. Automatic Memory Management.
2. Thread Management.
3. Code Compilation & Execution.
4. Code Verification.
5. High level of security.
6. Remoting.
7. Structured Exception Handling.
8. Interoperability between Managed and Unmanaged code.
9. Integration with Microsoft Office System

All .NET applications are compiled into Intermediate Language code (MSIL). When executed on the CLR, MSIL is converted into native machine code specific to the operating platform. This process is done by a Just In Time (JIT) compiler. The code executed by the CLR is called as Managed Code. This code is type safe and thoroughly checked by the CLR before being deployed.

The .NET runtime also provides a facility to incorporate existing COM components and DLL's into a .NET application. Code that is not controlled by the CLR is called Unmanaged Code.

One of the interesting points to note is that the CLR itself manages the life of objects. This is the effect of the Automatic Garbage Collection system built into it. When the CLR finds an object that is not being used, it destroys them and thus frees their memory allocation.

The .NET Framework is further comprised of Common Type System (CTS) and Common Language Specification (CLS). The CTS defines the common data types used by .NET programming languages. The CTS tells you how to represent characters and numbers in a program. The CLS represents the guidelines defined by for the .NET Framework. These specifications are normally used by the compiler developers and are available for all languages, which target the .NET Framework.

Object Oriented Programming

001: Generalization:

The concept of generalization in OOP means that an object encapsulates common state and behavior for a category of objects. Example: The geometric shape is an object and most geometric shapes have area, perimeter, and color.

002: Specialization:

The concept of specialization in OOP means that an object can inherit the common state and behavior of a generic object. However, each object needs to define its own special and particular state and behavior. Example: Each geometric shape has its own color and particular formulas to calculate its area and perimeter.


001: Constructor:

Constructors are used to create an instance of classes. Constructors may also used to initialize the class's members.

002: Destructor:

Destructors are used to destruct instances of classes.
• Destructors cannot be defined in structs. They are only used with classes.
• A class can only have one destructor.
• Destructors cannot be inherited or overloaded.
• Destructors cannot be called. They are invoked automatically.
• A destructor does not take modifiers or have parameters.

class First
    System.Diagnostics.Trace.WriteLine("First's destructor is called.");

class Second : First
    System.Diagnostics.Trace.WriteLine("Second's destructor is called.");

class Third : Second
    System.Diagnostics.Trace.WriteLine("Third's destructor is called.");

class Test
  static void Main()
    Third t = new Third();

/* Output: 
Third's destructor is called. 
Second's destructor is called. 
First's destructor is called. */


001. Page Life Cycle in ASP.NET

  • Page_PreInit
  • Page_Init
  • Page_InitComplete
  • Page_PreLoad
  • Page_Load
  • Page_LoadComplete
  • Page_PreRender
  • Render


Components of an ASP.NET MVC application

• M - Model
• V – View
• C – Controller

Model: Model represents the application data domain. In short the applications business logic is contained within the model.

View: Views represent the user interface, with which the end users interact. In short the all the user interface logic is contained within the UI.

Controller: Controller is the component that responds to user actions. Based on the user actions, the respective controller, work with the model, and selects a view to render that displays the user interface. The user input logic is contained within the controller.

Web Api

Web Services

WCF Services

REST Services

Java Script & JQuery
Sql Server


Entity Framework


  1. Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone! login


  2. Do you have a spam problem on this site; I also am a blogger, and I was wanting to know your situation; we have created some nice practices and we are looking to trade solutions with other folks, please shoot me an email if interested. gmail log in