0% found this document useful (0 votes)
4 views

OOPS - Object-Oriented Programming System

The document provides an overview of Object-Oriented Programming (OOP) concepts, including definitions of classes, objects, access modifiers, abstraction, encapsulation, polymorphism, inheritance, and interfaces. It explains the differences between abstract classes and interfaces, constructors, and various types of collections in .NET, along with their characteristics and usage. Additionally, it covers key terms such as delegates, shadowing, and the significance of access modifiers in C#.

Uploaded by

reachgopa87
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

OOPS - Object-Oriented Programming System

The document provides an overview of Object-Oriented Programming (OOP) concepts, including definitions of classes, objects, access modifiers, abstraction, encapsulation, polymorphism, inheritance, and interfaces. It explains the differences between abstract classes and interfaces, constructors, and various types of collections in .NET, along with their characteristics and usage. Additionally, it covers key terms such as delegates, shadowing, and the significance of access modifiers in C#.

Uploaded by

reachgopa87
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

OOPS - Object-Oriented Programming System

Interview Question Link: http://www.dotnetfunda.com/interview/ShowCatQuestion.aspx?


category=42
http://en.csharp-online.net/CSharp_FAQ:_How_make_a_CSharp_destructor_virtual
http://www.c-
sharpcorner.com/UploadFile/chandrahundigam/UnderstandingDestructors11192005021208
AM/UnderstandingDestructors.aspx

What is Object Oriented Programming?


It is a problem solving technique to develop software systems. It’s a technique to think real world
in terms of objects. Object maps the software model to real world concept. These objects have
responsibilities and provide services to application or other objects.

What’s a Class?
A class is a template definition of the methods and variables for a particular kind of object. In
other words, class is the blue print from which an individual objects is created.

What’s an Object?
It’s a basic unit of a system. An object is an entity that has attributes, behavior, and identity.
Objects are members of a class. Attributes and behavior of an object are defined by the class
definition.

What is Access Modifier?


Access modifiers determine the extent to which a variable or method can be accessed from
another class or object. The following five accessibility levels can be specified using the access
modifiers
1. Private
2. Protected
3. Internal
4. Protected internal
5. Public

1. Private:
In OOP Attributes, Methods, Properties, Constructors declared with “private” access modifier
get access or visible only to members of current class.

If we declared the variable as private in current class, we cannot access that variable in
another class due to the protection level of “private” access modifier.

2. Protected:
In OOP Attributes, Methods, Properties, Constructors declared with “protected” access
modifier get access or visible only to members of current class as well as to members of
derived class.
This means we can access Attributes, Methods, Properties, Constructors declared with
“protected” access modifier in derived class.

3. Internal:
In OOP Attributes, Methods, Properties, Constructors declared with “internal” access
modifier get access or visible only to members of current project or in current namespace.

This means we can access Attributes, Methods, Properties, and Constructors declared with
“internal” access or visible only to members of current project or in current namespace.

4. Protected Internal:
In OOP Attributes, Methods, Properties, Constructors declared with “protected internal”
access modifier get access or visible only to members of current project or in current
namespace and also to members of derived class.

5. Public:
In OOP Attributes, Methods, Properties, Constructors declared with “public” access modifier
get access or visible to all members of classes and projects.

This means “public” access modifier is access or visible to all members of classes and
projects.

What is Abstraction?
1. Abstraction is the representation of only the essential features of an object and hiding
unessential features of an object.
2. Through Abstraction all relevant data can be hide in order to reduce complexity and
increase efficiency.
3. It shows required data and hides unwanted data.

What is Encapsulation?
1. Encapsulation is a process of hiding all internal details of an object from the outside
world.
2. Encapsulation gives us maintainability, flexibility and extensibility to our code.

Difference between Encapsulation and Abstraction:


1. Abstraction solves the problem in the design 1. Encapsulation solves the problem in the
level. implementation level.
2. Abstraction is used for hiding the unwanted 2. Encapsulation means hiding the code and
data and giving relevant data. data in to a single unit to protect the data
from outside world.
3. Abstraction is a technique that helps to 3. Encapsulation is the technique for
identify which specific information should be packaging the information in such a way as
visible and which information should be to hide what should be hidden, and make
hidden. visible what is intended to be visible.
What is Polymorphism?
1. Poly means many and morph means form.
2. Polymorphism means same operation may behave differently on different classes.
3. Polymorphism is the ability to process objects differently depending on their data types.
4. Polymorphism is the ability to redefine methods for derived classes.

Types of Polymorphism:
1. Compile time Polymorphism
2. Run time Polymorphism

Compile time Polymorphism:


1. Compile time Polymorphism also known as Method Overloading
2. Method Overloading means having two or more methods with the same name but with
different signatures

Run time Polymorphism:


• Run time Polymorphism also known as Method Overriding
• Method Overriding means having two or more methods with the same name, same
signature but with different implementation.
Note: By default functions are not virtual in C# and so you need to write “virtual”
keyword explicitly.
What is an abstract class?
Following are features of an abstract class: -
1. We cannot create an object / instance of an abstract class.
2. Abstract class is designed to act as a base class (to be inherited by other classes).
3. Abstract classes are similar to interfaces. After declaring an abstract class, it cannot be
instantiated on its own it must be inherited.
4. In VB.NET abstract classes are created using “MustInherit” keyword. In C# we have
“abstract” keyword.
5. Abstract classes can have implementation or pure abstract methods which should be
implemented in the child class.

What is Object Lifetime?


All objects have life time. Objects are created, initialized, necessary functionalities are done and
later object is destroyed. Every object have their own state and identity, which differ from
instance to instance.

What is an Interface?
1. Interface is a contract that defines the signature of the functionality.
2. Single Class can implement multiple interfaces. If a class implements an interface then it has
to provide implementation to all its methods.

What is Inheritance?
Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is
defined in other classes The Class whose methods and variables are defined is called super class
or base class. The Class that inherits methods and variables are defined is called sub class or
derived class Sometimes base class known as Generalized Class and derived class known as
Specialized Class keyword to declare inheritance is “:” (colon) in Visual C#.

Benefits of using Inheritance


1. Code reusability increased through inheritance.
2. Inheritance provide a clear model structure which is easy to understand without
much complexity Using inheritance, classes become grouped together in a hierarchical
tree structure
3. Code is easy to manage and divided into parent and child classes

Types of Inheritance in C#: -


1. Implementation Inheritance
2. Multiple Inheritances (Interface Inheritance)

What is the difference between Abstract Class and Interface?


Abstract Class:
1. Abstract Class have method definition and implementation
2. It have control over the Access Modifiers
3. It does not support Multiple Inheritance
4. Some methods are concrete
5. It have Constructor and Destructor
6. Only one abstract have to be derived
Interface:
1. Interface has only Signature.
2. All the Methods are Public, It doesn't have control over the Access Modifier
3. Its support Multiple Inheritance in Object Oriented Language
4. All the Methods are Abstract.
5. It does not have Constructor, Destructor, Fields
6. A Class May inherits several Interfaces

We have two classes “Base Class” and “Derived Class”. We have created constructor and
Destructor of both Base and Derived classes. Which Constructor and Destructor will get
called first?
1. If we create Derived class object then, Base class constructor -> Derived Class
Constructor -> Derived Class Destructor -> Base Class Destructor will get called
respectively in above order.
2. If we create Base class object then, Base Class Constructor -> Base Class Destructor will
get called respectively

What are Constructors?


1. Constructors are used for initializing the members of a class whenever an object is
created with the default values for initialization.
2. If constructor is not defined then the CLR will provide an implicit constructor which is
called as Default Constructor.
3. A class can have any number of constructors provided they vary with the number of
arguments that are passed, which is they should have different signatures.
4. Constructors do not return a value
5. Constructors can be overloaded

What are the various types of Constructors?


1. Public: Accessible to All
2. Private: The classes in which only static members are there and you don't have to create
object of that class in any other class.
3. Static: Used for initializing only the static members of the class. These will be invoked
for the very first time when the class is being loaded on the memory. They cannot accept
any arguments. Static Constructors cannot have any access modifiers.
4. Intern: Implementations of the abstract class to the assembly defining the class. A class
containing an internal constructor cannot be instantiated outside of the assembly
(Namespace) and External

A constructor can be private. True or False


True. A constructor can be private. We can declare a constructor as private.

What is the work of a constructor?


Constructor creates and initializes the objects in an application.

What is "this" pointer?


This pointer is a pointer which points to the current object of a class. This is actually a keyword
which is used as a pointer which differentiates the current object with global object.

What is a delegate?
Delegate is a class that can hold a reference to a method or a function. Delegate class has a
signature and it can only reference those methods whose signature is compliant with the class.
Delegates are type-safe functions pointers or callbacks.
Delegate object can then be passed to code which can call the referenced method, without having
to know at compile time which method will be invoked.
Types of Delegates:
1. Single Cast Delegate: It represents one function.
2. Multi Cast Delegate: It represents more than one function.

What is shadowing?
When two elements in a program have same name, one of them can hide and shadow the other
one. So in such cases the element which shadowed the main element is referenced.
In C# by using the keyword “new” a programmer can hide inherited method / variable.
Below is a sample code, there are two classes “ShadowParent” and “ShadowChild”.
1. In “ShadowParent” there is a variable “iInt” which is an integer.
2. In “ShadowChild” overrides “ShadowParent” and shadows the “iInt” variable to a
string.
What’s difference between Shadowing and Overriding?
Following are the differences between shadowing and overriding:-
1. Overriding redefines only the implementation while shadowing redefines the whole
element.
2. In overriding derived classes can refer the parent class element by using “ME” keyword,
but in shadowing you can access it by “MYBASE”.

If we inherit a class do the private variables also get inherited?


Yes the variables are inherited but cannot be accessed directly by the class interface.

Can you prevent a class from overriding?


Yes. If you define a class as “Sealed” in C# and “NotInheritable” in VB.NET you can inherit
the class any further.

What’s the use of “MustInherit” keyword in VB.NET?


If you want to create an abstract class in VB.NET it’s done by using “MustInherit” keyword.
This acts only as base type. You cannot create an object of a class which is marked as
“MustInherit”.

What are similarities between Class and structure?


Following are the similarities between classes and structures:-
1. Both can have constructors, methods, properties, fields, constants, enumerations, events,
and event handlers.
2. Structures and classes can implement interface.
3. Both of them can have constructors without parameter and with parameter.
4. Both can have delegates and events.

What’s the difference between Class and structure’s?


Following are the key differences between them:-
1. Structure is value types and classes are reference types.
2. So structures use stack and classes use heap.
3. Structures members cannot be declared as protected, but class members can be.
4. You cannot do inheritance in structures.
5. Structures do not require constructors while classes require.
6. Objects created for classes are terminated using Garbage collector.
7. Structures are not destroyed using GC.
What does virtual keyword mean?
That method and property can be overridden.

What are shared (VB.NET)/Static(C#) class?


Static/Shared classes are used when a class provides functionality which is not specific to any
unique instance. Following are features of Static/Shared classes:-
1. Static/Shared classes cannot be instantiated.
2. Static/Shared classes are sealed so they cannot be inherited.
3. Static/Shared classes can have only static members.
4. Static/Shared classes can have only static constructor to initialize static members.

Compiler makes sure that no instance of static class is created. In previous version of C#, the
constructor has to be marked private to avoid this from happening.
What is the use of “Overrides” and “Overridable” keywords?
Overridable is used in parent class to indicate that a method can be overridden. Overrides are
used in the child class to indicate that you are overriding a method.

Where are all .NET Collection classes located?


System.Collection namespace has all the collection classes available in .NET.

What is the difference between Array and Array List?

No. Array Array List

1 Array comes in the System namespace Array List comes in the System.Collections
namespace
2 The capacity of array is fixed Array List size can increase and decrease
dynamically
3 An Array is a collection of similar items Array List can hold item of different types

4 An Array can have multiple dimensions Array List always has exactly one dimension

What is HashTable?
1. HashTable object contains items in key/value pairs.
2. The keys are used as indexes.
3. We can search value by using their corresponding key.
4. Items are added to the HashTable with the “Add ()” method.
5. The data type of HashTable is object and the default size of a HashTable is 16.

What is ENUM?
ENUM is used to define constants.

What are queues and stacks?


Queue is for first-in, first-out (FIFO) structures. Stack is for last-in, first-out (LIFO)
structures.

Can you override private virtual methods?


No, you cannot access private methods in inherited classes.

Can you declare the override method static while the original method is non-static?
No, you can't, the signature of the virtual method must remain the same, only the keyword virtual
is changed to keyword override.

What does the keyword virtual mean in the method definition?


The method can be over-ridden.

How's method overriding different from overloading?


When overriding, you change the method behavior for a derived class. Overloading simply
involves having a method with the same name within the class.

Static methods cannot use non static members. True or False.


True

Static Data Members should be initialized inside the constructor. True or False.
False. Static Data Members should not be initialized inside the constructor.

Why can't you specify the accessibility modifier for methods inside the interface?
We are not allowed to specify any accessibility. Since it's public by default.

Can you allow class to be inherited, but prevent the method from being over-ridden?
Yes, just leave the class public and make the method sealed.

Default Access modifiers in C#?


An ENUM has default modifier as Public

A Class has default modifiers as Internal. It can declare members (methods etc) with following
access modifiers:
1. Public
2. Internal
3. Private
4. Protected internal

An Interface has default modifier as Public

A Structure has default modifier as Internal and it can declare its members (methods etc) with
following access modifiers:
1. Public
2. Internal
3. Private
A methods, fields, and properties has default access modifier as "Private" if no modifier is
specified.

What is nested Classes?


Nested classes are classes with in classes. In below image “ClsNested” class has a
“ChildNested” class nested inside it.

In below sample code if we create a object of Class2 which constructor will fire first?
Public Class Class1
Sub New ()
End Sub
End Class
Public Class Class2 Inherits Class1
Sub New ()
End Sub
End Class
In above case, the Constructor of base Class (i.e. Class1) will get fire first and then Derived class
Constructor Class2 will get fire.

What is a private constructor? Where will you use it?


When you declare a Constructor with Private access modifier then it is called as Private
Constructor. We can use the private constructor in Singleton Pattern.

If you declare a Constructor as private then it doesn’t allow creating object for its derived class,
i.e. you lose inherent facility for that class.

Example:
Because Class A constructor declared as private hence its accessibility limit is to that class only,
Class B can't access. When we create an object for Class B that constructor will call constructor
A but class B have no rights to access the Class A constructor hence we will get compilation
error.

Difference between new and override keyword?


Let me explain this through code.
This is a window application so all the code for calling the function through objects is written in
Form_Load event.
As seen in above code, I have declared 2 classes. One works as a Base class and second is a
derived class derived from base class.

Now the difference is as follows:


new: hides the base class function.
Override: overrides the base class function.

If we create object like above notation and make a call to any function which exists in base class
and derive class both, then it will always make a call to function of base class. If we have
overidden the method in derive class then it will call the derive class function.
For example:

Note:
This will throw a compile time error. (Casting is required.)

This will throw run time error. (Unable to cast)

In which cases you use override and new base?


Use the new modifier to explicitly hide a member inherited from a base class. To hide an
inherited member, declare it in the derived class using the same name, and modify it with the
new modifier.

Can we call a base class method without creating instance?


Yes.
It’s possible if it’s a static method.
It’s possible by inheriting from that class also.
It’s possible from derived classes using base keyword.

What is Method Overriding? How to override a function in C#?


Use the override modifier to modify a method, a property, an indexer, or an event. An override
method provides a new implementation of a member inherited from a base class. The method
overridden by an override declaration is known as the overridden base method. The overridden
base method must have the same signature as the override method.
You cannot override a non-virtual or static method. The overridden base method must be virtual,
abstract, or override.

What is Method overloading?


Method overloading occurs when a class contains two methods with the same name, but different
signatures.

Method overloading allows us to write different version of the same method in a class or derived
class. Compiler automatically selects the most appropriate method based on the parameter
supplied.

To call the above method, you can use following code.

You can't have an overload method with same number parameters but different return type. In
order to create overload method, the return type must be the same and parameter type must be
different or different in numbers.

What is pure virtual function?


When you define only function prototype in a base class without and do the complete
implementation in derived class. This base class is called abstract class and client won’t able to
instantiate an object using this base class.

A pure virtual function is a function that must be overridden in a derived class and need not be
defined. A virtual function is declared to be "pure" using the curious "=0"
Syntax:
What is a sealed modifier?
1. Sealed types cannot be inherited & are concrete.
2. Sealed modifiers can also be applied to instance methods, properties, events & indexes. It
can't be applied to static members.
3. Sealed members are allowed in sealed and non-sealed classes.

What is Inheritance?
1. It provides a convenient way to reuse existing fully code in different context thereby saving
lot of coding.
2. Inheritance of classes in C# is always Implementation Inheritance.

What are new modifiers?


The new modifiers hide a member of the base class. C# supports only hide by signature.

What is Virtual keyword?


This keyword indicates that a member can be overridden in a child class. It can be applied to
methods, properties, indexes and events.

What is Abstract method?


Abstract method doesn't provide the implementation & forces the derived class to override the
method.

Can Interface inherit another Interface?


Yes, we can inherit Interface from another Interface.

Can Struct be inherited?


No, Struct cannot be inherited as they are implicitly sealed.

Are multiple inheritances possible in .NET?


1. No. Multiple inheritances are not possible in .NET.
2. This means it is not possible for one class to inherit from multiple classes. However, a class
may implement multiple interfaces.
3. We may also declare objects of different classes in a class. This way, the encapsulated class
may be instantiated in other classes.

What is a property?
Property - A property is a thing that describes the features of an object. A property is a piece of
data contained within a class that has an exposed interface for reading/writing. The main
difference between a field and a property is in the inclusion of an interface. Properties provide
the opportunity to protect a field in a class by reading and writing to it through the property.

We make use of Get and Set keywords while working with properties. We prefix the variables
used within this code block with an underscore. Value is a keyword, which holds the value which
is being retrieved or set to property.

Operator Overloading Concept

Operator Overloading: It is one of the features of Object Oriented Programming which gives
an extra ability to an operator to act on a User-defined operand (Objects).

Uses of Operator Overloading:


1. Extensibility: An operator will act differently depending on the operands provided.
2. Operator is not limited to work only with primitive Data Type.

Different Operators:
1. All C# binary operators can be over loaded. i.e. +, - , *, / , %,&,|, <<,>>.
2. All C# unary operators can be over loaded. i.e. +,_,!,++,-- .
3. All relational operators can be over loaded, but only as pairs. i.e. = =, !=, <>, <=, >=

Points to Remember while doing Operator Overloading:

1. While Overloading an Operator always give public static access specifier.


2. Operator Overloading should return a CLS type and not void.
3. At least one operand to the operator must be of type UDC [User Defined Class] because
we cannot overload a operator with two integer operands and perform subtraction for +
operator which C# does not allow.
4. Same Operator can be overloaded with different function signature for eg.
public static Matrix operator +(Matrix m1,int[,] m2)
{ }
5. We can also have one more method like this:
public static Matrix operator + (Matrix m1,Matrix m2)
{ }
What are the different types of Polymorphism?
There are two types of Polymorphism:
1. Static Polymorphism
2. Dynamic Polymorphism

 Static Polymorphism:
In Static Polymorphism the method called is decided at compile-time only. Method Overloading
is an example of Static Polymorphism.
Method overloading is a concept where we use the same method name many times in the same
class, but with different parameters.
Depending on the parameters we pass, it is decided at compile-time only, which method is too
called.
The same method name with the same parameters is an error and it is a case of duplication
of methods which C# does not permits. In Static Polymorphism decision is taken at compile
time. Static Polymorphism is also as Method Overloading / Compile Time Polymorphism / Early
Binding.

 Dynamic Polymorphism:
In Dynamic Polymorphism a call to an overridden function is resolved during runtime. Dynamic
Polymorphism is achieved using inheritance and overriding. Dynamic Polymorphism is also
known as Method Overriding / Late Binding / Runtime Polymorphism.

How do we achieve Encapsulation in C#?


1. Properties are a new language feature introduced with C#.
2. Properties in C# helps in protect a field in a class by reading and writing to it.
3. The first method itself is good but Encapsulation can be accomplished much smoother with
properties.
Example:
From the above example we see the usage of Encapsulation by using properties. The property
has two accessor get and set. The get accessor returns the value of the some property field. The
set accessor sets the value of the some property field with the contents of "value". Properties can
be made read-only. This is accomplished by having only a get accessor in the property
implementation.

What is the use of abstract classes? How will we decide in a scenario, whether we have to
use abstract class or interface?
We use Abstract class and interface to enforce some rules to the classes which
extends/implements. For example we can define a class say Bird and we can declare methods say
Fly() Walk() . This means whatever the class that is derived from Bird has to override or give
definition for Fly() and Walk() and therefore we are making sure that all the derived classes
follows or has the common functionalities. In other way the classes derived from super class
should have common properties. In addition to this the derive class can have its own methods
like Swim().

In case of Abstract class we can define COMMON functionalities in super class and those can be
used in the derived class where as in Interface we can’t do that. (this I would say as advantage of
abstract class)
In case of Interface the derived class can implement any number of interface but restricted to
extend only one abstract class (this i would say as advantage of Interface)

What is the Difference between Convert. ToString () and .ToString ()?


Generally Convert. ToString () handles NULLs where as ToString will return a Null
Reference Exception.
So it would be good if we use Convert. ToString () all the time for casting purposes.

What is the difference between for and for each loop?


Foreach will works only with arrays and Generic Collection. For will works for any logical
operation and will continue until given condition get fails. There is not much execution time
difference. They works almost same way and same speed as for each loop will takes time for
getting next element while iterating array while for loop will takes time to re-initialize the
variable.

What is the difference between =, == and ===?


1. “=”’ is for assigning one variable value to the other variable.
2. “==” is for the comparison between strings with number, number with number etc.
3. “===” is for the comparison between only number with number and string with string.

What is the difference between constant and read-only variable?

Constant Variable Read-Only Variable

Constant variable value is been assigned at the Read only variable value has been assigned at
compile time only. the runtime only.
Constant variable value cannot be changed Read only variables values can be changed
after its initialization. inside the constructors.
Constant variables value can be assigned to the Read only variables value can’t be assigned to
read only variable. the constant variables.

What is a partial class? What are the advantages of Partial class?


1. Partial classes is a new feature of OOPS in .NET2.0
2. Partial classes split the single class file into multiple class files by using the partial keyword.
3. When the application is complied, the complier will group all the partial classes together and
treat them as a single class and which is very efficient.
Advantages of Partial class:
1. It allows a clean separation of business logic and the user interface.
2. It allows programmers to work simultaneously on different parts of a class without needing
to share the same physical file.
3. You can easily write your code for extended functionality for a VS.NET generated class. This
will allow you to write the code of your own need without messing with the system generated
code.
Compilation
How does the C# compiler deal with partial classes?
If you disassemble the above program, you will see that the files A1.cs and A2.cs are eliminated
and the class A is present. Class A will contain the methods A1 and A2 in the same code block.
Thus, partial classes are precisely equivalent to a single class with all the members.

What is the Difference between ArrayList and Generic List:


http://www.dotnetspider.com/resources/20675-Difference-between-Arraylist-Generic-List.aspx

No. Array List List

1 Array List comes in the System.Collections List comes in the


namespace. (This namespace is added by System.Collections.Generics namespace. (We
default when we create any aspx page in need to add namespace if we want to use
C#) Generic Types)
2 ArrayList accept values as object Main advantage of Generic List is we can
So we can give any type of data in to that. specify the type of data we are going to insert
Eg: an ArrayList object accepting values in to
like String, int, decimal, char and a custom List. So that we can avoid boxing and
object Unboxing
This process is known as boxing
To get inserted values from array list we
have to specify the index.
So it will return that values as object.
We have to cast that value from object to its
original type.
This process that is converting from object to its
original type is known as Unboxing.

What are Generics in C#.Net?


The generics feature in C# has been introduced with version 2.0 of the .NET Framework and
these are just like templates in C++. Using generics we can create classes, methods, events,
delegates which work with any type (like int, string, custom object etc). The Advantages with
Generics are Performance will increase, Code Reusability and Type Safety.

What are the advantages of Generics?


1. Generics solve the problem of type safety.
2. Code Reusability: If we write a Generic Class or method once we can use that throughout our
program. Hence it is code reuse.
3. Performance: By using Generics performance increases, this is because we are not using the
concept of Boxing.
4. Generic methods can often be called without employing any special syntax by using a feature
called type inference
http://www.dotnetfunda.com/interview/exclusive/x2946-what-is-generic-class--what-is-the-
purpose-of-generic-class-.aspx

http://www.dotnetfunda.com/interview/exclusive/x2944-what-are-the-advantages-of-
generics-.aspx

You might also like