If you are struggling to get placed in a reputed organization but not able to get through the ugly and tough interviews then try below questions and find yourself sipping coffee and relaxing in cafeteria of big brands like Infosys, IBM, Wipro, RBS and so on. Lets not waste much time dreaming and get directly to questions.
Q1: Define Static Members in C#
A1:If an attributes value had to be same across all the instances of the same class , static keyword is used. For example if the Minimum salary should be set for all employees in the employee class, use the following code
private static double MinSalary = 30000;
For static members only single memory space will be shared by all instances. When to use static member depends upon the requirement If there are certain values that needs to be same across all instances i.e that doesn't depends upon the particular instance/user like web config keys, utilities values, logging details etc for this we can use static members.
Q2: What are Value and Reference Types
A2: Let's try to understand this with the help of an example, in C# we have Struct which is a value type and Class which is a reference type. The run time environment deals different with these 2 types.
When a value-type instance is created, a single space in memory is allocated to store the value. Primitive types such as int, float, bool and char are also value types, and work in the same way. When the runtime deals with a value type, it's dealing directly with its underlying data and this can be very efficient, particularly with primitive types.
With reference types, however, an object is created in memory, and then handled through a separate reference—rather like a pointer.Suppose Point is a struct, and Form is a class. We can instantiate each as follows:
Point p1 = new Point(); // Point is a *struct*
Form f1 = new Form(); // Form is a *class*
In the first case, one space in memory is allocated for p1, wheras in the second case, two spaces are allocated: one for a Form object and another for its reference (f1).
If we copy the objects to new variables:
Point p2 = p1;
Form f2 = f1;
p2, being a struct, becomes an independent copy of p1, with its own separate fields. But in the case of f2, all we’ve copied is a reference, with the result that both f1 and f2 point to the same object.
Q3: Difference between a Field and Property
A3: 1. Fields can not be used inside Interfaces.
2. Encapsulation: Since property have Get and Set methods so if required you can control the access for a variable i.e to make a property read only omit its Set method and to make it write only omit its Get method.
3. Validation: While your application currently may not require any validation logic to set a particular value, changing business requirements may require inserting this logic later. At that point changing a field to a property is a breaking change for consumers of your API.
4.A lot of the .NET data binding infrastructure binds to properties but not fields.
5. OOPS Design: As per design principle public variables are not exposed outside the class directly rather properties are used for that, fields are generally private to class.
Q4: Define Method Overloading in C#
A4: Different type of overloading in C# are
1)Constructor overloading
2)Function overloading.
3)Operator overloading
Method Overloading
One of the key features of object-oriented programming is polymorphism. Polymorphism permits objects to behave in different ways according to the manner in which they are used. One part of polymorphism is the ability for a method to behave differently according to the types and number of parameters that are passed to it. This is achieved through method overloading.
Method overloading allows the programmer to define many methods with the same name but with a different set of parameters. Each combination of parameter types is known as a signature of the method. When a call is made to one of these overloaded methods, the compiler automatically determines which of the methods should be used according to the arguments used in the call and the available method signatures.
Why one should need Method Overloading
One of the greatest advantages of method overloading is the improvement that it provides to code readability and maintainability. In languages that do not support this technique, or that of optional operands, a new method must be created for every possible combination of parameters. For example, in the ANSI C programming language to truncate a value you would use trunc, truncf or truncl according to the data type being rounded. In C#, method overloading allows you to always call Math.Truncate. This becomes even more useful when a change in the requirements of the program means that data types change. Unlike with the older languages, the C# truncate method would require no code modification.
When using method overloading, each version of a method should perform the same general function using different data types or numbers of parameters. Although it is possible to create two methods with the same name that perform completely different tasks, this just reduces the quality of your code. In a nutshell you can say when you require to perform somewhat same task but for different type and number of parameters.
Constructor Overloading
In Constructor overloading, n number of constructors can be created for same class. But the signatures of each constructor should vary. For example
public class Employee
{
int age;
public Employee()
{ age=30;}
public Employee(int age)
{ this.age=age;}
}
Operator Overloading
Operator overloading which is also known as overloading basically provides a way to define and use operators such as +, -, and / for user-defined classes or structs. It also allows us to define/redefine the way operators work with our classes and structs. In this way, this technique allows programmers to make their custom types look and feel like simple types such as
Q5: Define Data Encapsulation and Abstraction in c#
A5 :Encapsulation is way to hide data, properties and methods from outside the world or outside of the class scope and exposing only necessary thing.Encapsulation complements Abstraction. Abstraction display only important features of a class and Encapsulation hides unwanted data or private data from outside of a class.It hides the information within the object and prevents from accidental corruption.Hidden parts of a class acts like Encapsulation and exposed part of a class acts like Abstraction.
Encapsulation can be acheived by those two methods. The first method is using a pair of conventional accessor(Get) and mutator(Set) methods. Another one method is using a named property. For example,
public class Department
{
private string departname;
// Accessor.
public string GetDepartname()
{
return departname;
}
// Mutator.
public void SetDepartname( string a)
{
departname=a;
}
}
By using Property,
public class Department
{
private string departname;
// property
public string Departname
{
get
{
return departname;
}
set
{
departname=value;
}
}
}
Q6: What is Polymorphism in C# and different forms of Polymorphism?
A6: Polymorphism means many forms (ability to take more than one form). In Polymorphism poly means “multiple” and morph means “forms” so polymorphism means many forms.
Q7: What is Virtual Keyword in c#?
A7: If a base class method is to be overriden, it is defined using the keyword virtual (otherwise the sealed keyword is used to prevent overriding).
Note that the class member method may be overriden even if the virtual keyword is not used, but its usage makes the code more transparent & meaningful. In VB.NET, we may use the overridable keyword for this purpose.
When the override keyword is used to override the virtual method, in a scenario where the base class method is required in a child class along with the overriden method, then the base keyword may be used to access the parent class member. For example,
Q8: Define Method Hiding in C#
A8: If the derived class doesn't want to use methods in base class , derived class can implement the same method in derived class with same signature. For example in the classes given below, DriveType() is implemented in the derived class with same signature. This is called Method Hiding.
class Car
{
public void DriveType()
{
Console.WriteLine("Right Hand Drive");
}}
class Ford : Car
{
public void DriveType()
{
Console.WriteLine("Right Hand ");
}}
Q9: Difference between Static, Sealed and Abstract Classes
If a method
is declared as sealed it cannot be overridden. Used to avoid instability of
some major code.
Abstract Class: Declared with abstract keyword, this class is primarily created as a Inheritable class. An abstract class enables other classes to inherit from this class, but forbids to instantiate. One can inherit from an abstract class but we cannot create objects of an abstract class. Abstract class can have abstract as well as non abstract methods. Abstract methods are those which are not having method definition.
One important point to remember is a non-static class can have static methods. But Static classes must have all members as Static.
Class Type:----------------------normal ------- static--------sealed----------abstract
Can be instantiated:------------yes-------------no--------------yes----------------no
Can be inherited:----------------yes-------------no--------------no-----------------yes
Can inherit from others:-------yes-------------no--------------yes----------------yes
Q10: Difference between Thread and Process
A10: 1. Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.This allows threads to read from and write to the same data structures and variables, and also facilitates communication between threads. Communication between processes – also known as IPC, or inter-process communication – is quite difficult and resource-intensive.
2. Each process is started with a single thread, often called the primary thread, but can create additional threads from any of its threads.It's important to note that a thread can do anything a process can do. But since a process can consist of multiple threads, a thread could be considered a 'lightweight' process. Thus, the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more 'heavyweight' tasks – basically the execution of applications.
3. Modifying a main thread may affect subsequent threads while changes on a parent process will not necessarily affect child processes.
Q11: Difference between EXE and DLL
A11: Fullname of exe is Extensible Execute File and that of dll is Dynamic Link Library.
1. Exe file is a executable file which runs in a sep1rate process which is managed by OS,where as a dll file is a dynamic link library which can be used in exe files and other dll files.In .net frame work both are assemblies.
2. When a system launches new executable(exe), a new process is created.The system loads a DLL into the context of an existing process.
3. When loading an executable, no export is called, but only the module entry point where as for Dll there are multiple exported symbols.
4. Exe Can Run On its own but Dll cannot Run on its own.
5. Dll share memory of calling process where as exe has its own memory space i.e process space.
6.A dll file usually contains compiled versions of some functions that can be linked into a program.This means that many different programs can use this library to do their tasks making it easier on the programmers so that they do not have to keep reinventing the wheel each time they write software. In simple terms a .DLL file will contain logic that other programs will use. Where as EXE stands for executable and denotes that a program is executable. This just means that if you double click on the file a program will run, normally with some kind of interface for a user to interact with. Exe usually contains a complete program.
Q12: Difference between Strong Typing and Week Typing
A12: In a weakly typed language, the type of a value depends on how it is used. For example if I can pass a string to the addition operator and it will automatically be interpreted as a number or cause an error if the contents of the string cannot be translated into a number. Similarly, I can concatenate strings and numbers or use strings as booleans, etc. In a strongly typed language, a value has a type and that type cannot change. What you can do to a value depends on the type of the value.
The advantage of a strongly typed language is that you are forced to make the behavior of your program explicit. If you want to add a number and a string your code must translate the string into a number to be used as an operand of the addition operator. This makes code easier to understand because there is no (or less) hidden behavior. The advantage of a weakly typed language is that you need to write less code. However, that code is harder to understand because a lot of its behavior is hidden in implicit type conversions.
Q13: Difference between .Equals() and ==
A13: When we create any object there are two parts to the object one is the content and the other is reference to that content.
So for example if you create an object as shown in below code:-
Now consider another example
Q14: What is GAC and what problem does it solve
A14: Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies that are to be shared by several applications on the computer. This area is typically the folder under windows or winnt in the machine.
All the assemblies that need to be shared across applications need to be done through the Global assembly Cache only. However it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.
There are several ways to deploy an assembly into the global assembly cache:
1.Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache.
2.Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK.
3.Use Windows Explorer to drag assemblies into the cache.GAC solves the problem of DLL Hell and DLL versioning. Unlike earlier situations, GAC can hold two assemblies of the same name but different version. This ensures that the applications which access a particular assembly continue to access the same assembly even if another version of that assembly is installed on that machine.
What Problem Does it Solve
Before some time, if we install an application then dll of that application get stored in the registry, then if we install other application that has same name .dll that means previously installed .dll get overwrite by the same name new .dll. Ok for newly installed application but previously installed application cant get execute further. This is big problem in context of version of same application. This is Dell-Hell problem.
Dll Hell refers to a set of problems caused when multiple applications attempt to share a common component like a dynamic link library (DLL). The reason for this issue was that the version information about the different components of an application was not recorded by the system.
This problem of dynamic link library (.dll) is resolved through Versioning.
Versioning is the technique to provide version to the .dll to prevent them from replacement. GAC (Global assembly cache) is the separate memory like cache it is used to remove load form operating system.
0(major version).0(minor version).0(revised version).0(new version)
We can do versioning only with shared assembly because to install .dll in GAC so we need to have strong key name.
Q1: Define Static Members in C#
A1:If an attributes value had to be same across all the instances of the same class , static keyword is used. For example if the Minimum salary should be set for all employees in the employee class, use the following code
private static double MinSalary = 30000;
For static members only single memory space will be shared by all instances. When to use static member depends upon the requirement If there are certain values that needs to be same across all instances i.e that doesn't depends upon the particular instance/user like web config keys, utilities values, logging details etc for this we can use static members.
Q2: What are Value and Reference Types
A2: Let's try to understand this with the help of an example, in C# we have Struct which is a value type and Class which is a reference type. The run time environment deals different with these 2 types.
When a value-type instance is created, a single space in memory is allocated to store the value. Primitive types such as int, float, bool and char are also value types, and work in the same way. When the runtime deals with a value type, it's dealing directly with its underlying data and this can be very efficient, particularly with primitive types.
With reference types, however, an object is created in memory, and then handled through a separate reference—rather like a pointer.Suppose Point is a struct, and Form is a class. We can instantiate each as follows:
Point p1 = new Point(); // Point is a *struct*
Form f1 = new Form(); // Form is a *class*
In the first case, one space in memory is allocated for p1, wheras in the second case, two spaces are allocated: one for a Form object and another for its reference (f1).
If we copy the objects to new variables:
Point p2 = p1;
Form f2 = f1;
p2, being a struct, becomes an independent copy of p1, with its own separate fields. But in the case of f2, all we’ve copied is a reference, with the result that both f1 and f2 point to the same object.
Q3: Difference between a Field and Property
A3: 1. Fields can not be used inside Interfaces.
2. Encapsulation: Since property have Get and Set methods so if required you can control the access for a variable i.e to make a property read only omit its Set method and to make it write only omit its Get method.
3. Validation: While your application currently may not require any validation logic to set a particular value, changing business requirements may require inserting this logic later. At that point changing a field to a property is a breaking change for consumers of your API.
4.A lot of the .NET data binding infrastructure binds to properties but not fields.
5. OOPS Design: As per design principle public variables are not exposed outside the class directly rather properties are used for that, fields are generally private to class.
Q4: Define Method Overloading in C#
A4: Different type of overloading in C# are
1)Constructor overloading
2)Function overloading.
3)Operator overloading
Method Overloading
One of the key features of object-oriented programming is polymorphism. Polymorphism permits objects to behave in different ways according to the manner in which they are used. One part of polymorphism is the ability for a method to behave differently according to the types and number of parameters that are passed to it. This is achieved through method overloading.
Method overloading allows the programmer to define many methods with the same name but with a different set of parameters. Each combination of parameter types is known as a signature of the method. When a call is made to one of these overloaded methods, the compiler automatically determines which of the methods should be used according to the arguments used in the call and the available method signatures.
Why one should need Method Overloading
One of the greatest advantages of method overloading is the improvement that it provides to code readability and maintainability. In languages that do not support this technique, or that of optional operands, a new method must be created for every possible combination of parameters. For example, in the ANSI C programming language to truncate a value you would use trunc, truncf or truncl according to the data type being rounded. In C#, method overloading allows you to always call Math.Truncate. This becomes even more useful when a change in the requirements of the program means that data types change. Unlike with the older languages, the C# truncate method would require no code modification.
When using method overloading, each version of a method should perform the same general function using different data types or numbers of parameters. Although it is possible to create two methods with the same name that perform completely different tasks, this just reduces the quality of your code. In a nutshell you can say when you require to perform somewhat same task but for different type and number of parameters.
Constructor Overloading
In Constructor overloading, n number of constructors can be created for same class. But the signatures of each constructor should vary. For example
public class Employee
{
int age;
public Employee()
{ age=30;}
public Employee(int age)
{ this.age=age;}
}
Operator Overloading
Operator overloading which is also known as overloading basically provides a way to define and use operators such as +, -, and / for user-defined classes or structs. It also allows us to define/redefine the way operators work with our classes and structs. In this way, this technique allows programmers to make their custom types look and feel like simple types such as
int
and string
. It
basically consists of nothing more than a method declared by the keyword
operator and followed by an operator. There are mainly three types of over loadable operators called unary, binary, and conversion. But not all
operators of each type can be overloaded.Q5: Define Data Encapsulation and Abstraction in c#
A5 :Encapsulation is way to hide data, properties and methods from outside the world or outside of the class scope and exposing only necessary thing.Encapsulation complements Abstraction. Abstraction display only important features of a class and Encapsulation hides unwanted data or private data from outside of a class.It hides the information within the object and prevents from accidental corruption.Hidden parts of a class acts like Encapsulation and exposed part of a class acts like Abstraction.
Encapsulation can be acheived by those two methods. The first method is using a pair of conventional accessor(Get) and mutator(Set) methods. Another one method is using a named property. For example,
public class Department
{
private string departname;
// Accessor.
public string GetDepartname()
{
return departname;
}
// Mutator.
public void SetDepartname( string a)
{
departname=a;
}
}
By using Property,
public class Department
{
private string departname;
// property
public string Departname
{
get
{
return departname;
}
set
{
departname=value;
}
}
}
Q6: What is Polymorphism in C# and different forms of Polymorphism?
A6: Polymorphism means many forms (ability to take more than one form). In Polymorphism poly means “multiple” and morph means “forms” so polymorphism means many forms.
In
Polymorphism we have 2 different types those are
Compile Time Polymorphism (Called as Early Binding or Overloading
or static binding)
Run Time Polymorphism (Called as Late Binding or Overriding
or dynamic binding)
Overridden functions are functions that have the same
signature, but are implemented in different derived classes. At compile
time, usually the base class type is used to reference an object,
though at run time this object could be of a derived type, so when an
overridden method is called, the implementation that is called is
dependent on what kind of object is doing the calling (base vs. a
derived type) which is unknown at compile time.
Overloading (not really polymorphism) is simply multiple functions which have the same name but different signatures (think multiple constructors for an object taking different numbers of arguments). Which method is called is known at compile time, because the arguments are specified at this time.
Overloading (not really polymorphism) is simply multiple functions which have the same name but different signatures (think multiple constructors for an object taking different numbers of arguments). Which method is called is known at compile time, because the arguments are specified at this time.
Q7: What is Virtual Keyword in c#?
A7: If a base class method is to be overriden, it is defined using the keyword virtual (otherwise the sealed keyword is used to prevent overriding).
Note that the class member method may be overriden even if the virtual keyword is not used, but its usage makes the code more transparent & meaningful. In VB.NET, we may use the overridable keyword for this purpose.
When the override keyword is used to override the virtual method, in a scenario where the base class method is required in a child class along with the overriden method, then the base keyword may be used to access the parent class member. For example,
public class Employee { public virtual void SetBasic(float money) //This method may be overriden { Basic += money; } } public class Manager : Employee { public override void SetBasic(float money) //This method is being overriden { float managerIncentive = 10000; base.SetSalary(money + managerIncentive); //Calling base class method } }
Q8: Define Method Hiding in C#
A8: If the derived class doesn't want to use methods in base class , derived class can implement the same method in derived class with same signature. For example in the classes given below, DriveType() is implemented in the derived class with same signature. This is called Method Hiding.
class Car
{
public void DriveType()
{
Console.WriteLine("Right Hand Drive");
}}
class Ford : Car
{
public void DriveType()
{
Console.WriteLine("Right Hand ");
}}
Q9: Difference between Static, Sealed and Abstract Classes
A9: Static Class: Declared with Static keyword, methods in Static Class are also static along with variables of the class.This class cannot be instantiated, i.e we cannot have objects of this
class. To access methods of this class, you can directly use
classname.method. Also this class cannot be inherited.
Sealed
Class: Declared with Sealed keyword, which enables this class to seal all its
variables, methods and properties. No other class can inherit anything from
this class or in other words, this class cannot be inherited. But we can
instantiate this class, i.e we can have any number of objects of a sealed
class.Basically used for commercial reasons where restrictions are implemented
on the class so that no one use the existing class and derive from it without
the license.
Abstract Class: Declared with abstract keyword, this class is primarily created as a Inheritable class. An abstract class enables other classes to inherit from this class, but forbids to instantiate. One can inherit from an abstract class but we cannot create objects of an abstract class. Abstract class can have abstract as well as non abstract methods. Abstract methods are those which are not having method definition.
One important point to remember is a non-static class can have static methods. But Static classes must have all members as Static.
Class Type:----------------------normal ------- static--------sealed----------abstract
Can be instantiated:------------yes-------------no--------------yes----------------no
Can be inherited:----------------yes-------------no--------------no-----------------yes
Can inherit from others:-------yes-------------no--------------yes----------------yes
Q10: Difference between Thread and Process
A10: 1. Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.This allows threads to read from and write to the same data structures and variables, and also facilitates communication between threads. Communication between processes – also known as IPC, or inter-process communication – is quite difficult and resource-intensive.
2. Each process is started with a single thread, often called the primary thread, but can create additional threads from any of its threads.It's important to note that a thread can do anything a process can do. But since a process can consist of multiple threads, a thread could be considered a 'lightweight' process. Thus, the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more 'heavyweight' tasks – basically the execution of applications.
3. Modifying a main thread may affect subsequent threads while changes on a parent process will not necessarily affect child processes.
Q11: Difference between EXE and DLL
A11: Fullname of exe is Extensible Execute File and that of dll is Dynamic Link Library.
1. Exe file is a executable file which runs in a sep1rate process which is managed by OS,where as a dll file is a dynamic link library which can be used in exe files and other dll files.In .net frame work both are assemblies.
2. When a system launches new executable(exe), a new process is created.The system loads a DLL into the context of an existing process.
3. When loading an executable, no export is called, but only the module entry point where as for Dll there are multiple exported symbols.
4. Exe Can Run On its own but Dll cannot Run on its own.
5. Dll share memory of calling process where as exe has its own memory space i.e process space.
6.A dll file usually contains compiled versions of some functions that can be linked into a program.This means that many different programs can use this library to do their tasks making it easier on the programmers so that they do not have to keep reinventing the wheel each time they write software. In simple terms a .DLL file will contain logic that other programs will use. Where as EXE stands for executable and denotes that a program is executable. This just means that if you double click on the file a program will run, normally with some kind of interface for a user to interact with. Exe usually contains a complete program.
Q12: Difference between Strong Typing and Week Typing
A12: In a weakly typed language, the type of a value depends on how it is used. For example if I can pass a string to the addition operator and it will automatically be interpreted as a number or cause an error if the contents of the string cannot be translated into a number. Similarly, I can concatenate strings and numbers or use strings as booleans, etc. In a strongly typed language, a value has a type and that type cannot change. What you can do to a value depends on the type of the value.
The advantage of a strongly typed language is that you are forced to make the behavior of your program explicit. If you want to add a number and a string your code must translate the string into a number to be used as an operand of the addition operator. This makes code easier to understand because there is no (or less) hidden behavior. The advantage of a weakly typed language is that you need to write less code. However, that code is harder to understand because a lot of its behavior is hidden in implicit type conversions.
Q13: Difference between .Equals() and ==
A13: When we create any object there are two parts to the object one is the content and the other is reference to that content.
So for example if you create an object as shown in below code:-
- "Interview Questions” is the content.
- “obj1” is the reference to that content.
object obj1 = "Interview Questions";
“==” compares if the object references are same while “.Equals()” compares if the
contents are same.
object obj1 = "Interview Questions"; object obj2 = obj1; Console.WriteLine(obj1 == obj2); Console.WriteLine(obj1.Equals(obj2)); Console.ReadLine();
Output : TRUE
TRUE
Now consider another example
object obj1 = "Interview Questions"; object obj2 = new string("Interview Questions".ToCharArray()); Console.WriteLine(obj1 == obj2); Console.WriteLine(obj1.Equals(obj2)); Console.ReadLine();
Output : FALSE
TRUE
Q14: What is GAC and what problem does it solve
A14: Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies that are to be shared by several applications on the computer. This area is typically the folder under windows or winnt in the machine.
All the assemblies that need to be shared across applications need to be done through the Global assembly Cache only. However it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.
There are several ways to deploy an assembly into the global assembly cache:
1.Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache.
2.Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK.
3.Use Windows Explorer to drag assemblies into the cache.GAC solves the problem of DLL Hell and DLL versioning. Unlike earlier situations, GAC can hold two assemblies of the same name but different version. This ensures that the applications which access a particular assembly continue to access the same assembly even if another version of that assembly is installed on that machine.
What Problem Does it Solve
Before some time, if we install an application then dll of that application get stored in the registry, then if we install other application that has same name .dll that means previously installed .dll get overwrite by the same name new .dll. Ok for newly installed application but previously installed application cant get execute further. This is big problem in context of version of same application. This is Dell-Hell problem.
Dll Hell refers to a set of problems caused when multiple applications attempt to share a common component like a dynamic link library (DLL). The reason for this issue was that the version information about the different components of an application was not recorded by the system.
This problem of dynamic link library (.dll) is resolved through Versioning.
Versioning is the technique to provide version to the .dll to prevent them from replacement. GAC (Global assembly cache) is the separate memory like cache it is used to remove load form operating system.
0(major version).0(minor version).0(revised version).0(new version)
We can do versioning only with shared assembly because to install .dll in GAC so we need to have strong key name.
No comments:
Post a Comment