| Introduction In this article I am going to explain some basic concepts for .NET Framework, like classes, objects, garbage collection etc. These all topics are not explained in detail in article but some very easy and basic definitions for these concepts are given here, that are easy to understand. —————————————————————————————————————————- |
Classes Classes are templates for an object. They describes the kind and amount of data, that an object will contain, But they do not represent any particular instance of an object. |
Object An object is an instance of class that uses the methods, member variables of class from which the object is being instantiated. |
Abstraction An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provides crisply defined conceptual boundaries relative to the perspective of the user. |
Encapsulation Encapsulation is the process of hiding all of the details of an object that do not contribute to its essential characteristics. |
Inheritance Inheritance is the ability of a class to derive its characteristics from an existing class.In .Net, if you want that the class that you have created can’t be inheritable by a derived class then use the NotInheritable keyword. This feature in .NET provides the functionality of code-reuse. |
Polymorphism Polymorphism has been derived from the Greek words poly and morphous, which means many and forms. So the polymorphism can be defined as an entity that exists in many forms, like a women being a sister, wife, a mother and so on. |
Four pillar of Object Oriented Programming |
|
Constructor The Constructor is the first method that is run when an instance of a type is created. In visual basic a constructor is always Sub new (). Constructor are use to initialize class and structure data before use. Constructor never returns a value and can be overridden to provide custom initialization functionality. The constructor provides a way to set default values for data or perform other necessary functions before the object available for use. |
Destructor Destructors are called just before an object is destroyed and can be used to run clean-up code. You can’t control when a destructor is called. |
Access-Modifiers OR Access-Specifiers You can control how elements of your application accessed by using access modifiers, access modifiers are public, private, friend, protected etc. |
Arrays Arrays are a way to manage group of similar typed values or objects. |
Constants Constants have a fixed value that once set cannot be changed or re-defined. You can define the level of constants using access-modifiers. |
Structures In VB.NET a structure is a generalization of user-defined data types OR you can say you combine variable of different data types to define a structure. You define a structure when you want a single variable to hold multiple types data. Syntax: Structure . . . . End Structure You can specify the access of the structure using access specifiers. |
Overloading Overloading enables method to be defined with the same name but with different parameters. In other words it allows you to have multiple implementations of a method. It can be implemented using Overloads keyword in .NET. |
Overriding Overriding is the capability of a class to override the characteristic of the parent class. It can be implemented using Overrides keyword in .NET. |
Abstracts classes Similar to other oops languages VB.NET allow you to create abstract classes. Abstract classes are the classes that contain the skeleton of the methods that the derived class can implement. Using the MustInherit keyword abstract classes can be implemented in .NET. |
Interface An interface contains only the declaration of properties, methods and events etc. Classes and structure implements interfaces. In interfaces you cannot declare a variable. |
Classes & Structures |
There is a difference between both that is, |
|
Abstract Classes & Interfaces Interface implements highest level of abstraction because it cannot contain body of the method defined, whereas an abstract class may contain a method that has body. |
Assembly Assemblies are the building blocks of the .NET applications. An assembly can consists of a single executable file or a number of executable and resource files that contain information necessary about deploying and maintaining the version of an application. You can think of an assembly as a logical EXE or DLL. One or more assemblies are combined to form an application. |
.NET Framework Microsoft has introduced .NET with the intention of bridging the gap in interoperability between applications. It is designed to make significant improvements in code-reuse, code-specialization, resource management, multi-language development, security, deployment and administration. |
|
Components of .NET Framework |
.Net Framework base classes .Net class library that works with any .net language such as VB.NET or C#. This class library is built on the object oriented nature of the runtime. It provides classes that can e used in code to accomplish common programming tasks. |
Common Language Runtime (CLR) The CLR is the most essential component of the .NET framework. As like java having its on runtime environment (JRE – java runtime environment), .Net having its own as CLR. Runtime environment basically provides path with which the program can be executed. The CLR runtime provides functionalities, Such as: |
Features provided by CLR: |
|
Managed Code The code that is developed with a language compiler that targets the CLR is called Managed Code. |
Unmanaged Code The code that is developed without considering the convention and requirements of the CLR is called Unmanaged Code. Unmanaged code runs and executes in CLR with minimal services. For example: Unmanaged code may run with limited debugging and without garbage collection process. |
Class Loader Class loader loads the code in the memory. |
Garbage Collection The automatic memory management scheme employed by the .net framework is called Garbage Collection. The garbage collector continuously traces the out of scope objects in the background and identifies objects that no longer have references. Because the garbage collector is always running, you do not have to explicitly destroy the objects, it will automatically cleaned when you are finished working with them. You can also force the garbage collector to run using System.GC.Collect() method. Reference : Prashant Pandey (TechAhead) |
|
******* |
.NET – Basic Terms in .Net
September 30, 2007 by Prashant Pandey

it wd be help ful for me atleast…
Structures don’t just hold data members. They are value types but can have methods, and even implement interfaces. They also can have access modifiers and constructors – but no inheritance chain (though they do inherit from System.Object).
I think the basic rule of thumb is that if your class is going to be less than 16 bytes, or you’re going to allocate a lot of them, or you want value type equality – then you should strongly consider a struct instead of a class.
I’d also add value types and reference types, boxing/unboxing, generics, enums, events and delegates to the list to round it out.
It’s always good to go right back to basics and take a look. After all, who knows if we’ve missed something?
Nice very explicative and fast. Keep Going
Good Very Explicative
Simple , Good Go ahead
Oh, and did not know about it. Thanks for the information …
Its really Short time covering all terms related OOPS and .Net environment..
Marvellous
Nice Info Thanx..Wish you gud luk for upcoming information to display,,Outstanding…
hi, thanks for this nice article.
IT’s really helpful at the time of interview preparation
thks 4 post
Coooool… I’m very happy with basic c++ concept.
Thnks
Clear and crisp definitions.
These are Very Usefull Comments For me atleast
thnx dude………………….now i am very confident about oops………once again thnx……….
Why did .NET framework open a user account on my Windows XP? I didn’t add it (and only I have admin rights). Is this something I can delete and live “safely” without? Thx.
Its simple and nice.
Good one..
this help me alot..plz provide much more information that would help people alot…thanks
very nice and brief information abt oops basic concept