Friday, March 11, 2016

Dot Net interview question and answer for fresher



What is an application server?
An application server is a software engine that delivers applications to client computers. The name of the application server is IIS, IBM, Red Hat etc.

What is inheritance?
Inheritance is one of the fundamental object oriented programming language concept that allow the creation of hierarchical classifications.in C# programming the, a class that is inherited is called base class. In simple words the child class inherit variables, methods, properties and indexers of the parent class by using the “:” character. The main advantage inheritance is to re-usability of code.

How do you prevent a class from being inherited?
By making the class sealed

Can you use multiple inheritance in .NET?
We cannot use multiple inheritance in .NET directly it can be use by the interface

What is an Interface?
Interface is like a class but has no implementation it contains only declaration methods, properties and indexer .It is declared by the interface keywords in place of class.

What is abstract class in c#?
An abstract class is an incomplete class that cannot be instantiated, it only allow other class to inherit from it.an abstract method must be implemented in child class by using the override keyword.

What is structure in c#?
In C sharp Structure are the light weight classes and also value type, it contains fields, methods, constants, constructor, indexer.

Polymorphism in c # with example
Ability to take more than one form is called polymorphism. The polymorphism consist two words poly and morphism poly means “multiple” and morphism means “form”.

What is constructor in C#?
Constructor is special kinds of method which is automatically call when we create the instance or object of the class. It is also responsible for the object initialization and memory allocation of class.
Constructor name and class name should be same.
Constructor don’t return any value
We cannot inherited to the constructor
Constructor always public
Types of constructor
The types of Constructor are given below:
1. Default constructor
2. Parameterized constructor
3. Private constructor
4. Copy constructor
5. Static constructor

What is generic in C#?
Generic can be defined as <T> sign after the class name, by using the generic there is no need of boxing and unboxing. Generic also can be implemented with interfaces, delegates and methods.

What is Boxing/Unboxing?
Conversion of value type to reference type is called boxing and reference type to value type is called unboxing.

What is delegate?
Delegate is a user defined data type. It is used to store the reference of method.

What is Enum?
An Enum is a user defined value data type and also a group of related constant.

What is partial class?
Partial class is the class by which the class code is divided into two .cs file.

Why we use Generic?
By using the generic there is no need of boxing and unboxing.

What is the element of MSIL?
MSIT contains manifest, Meta data, assemble code

What is root name space?
System

What is super most class?
Object

You can create two default constructors
Yes, Static and Non Static

Does static constructor may be copy constructor
No

May the static constructor parameterized.
No Only Default.

What is CLS?
CLS is stand for common language specification, all the common set of rules which is necessary to follow to all the language is called CLS.

What of CTS?
CTS is stand for common type system the work of the CTS is to convert all language data type into the common data type.

What is business logic?
It is the functionality which handles the exchange of information between database and a user interface.

What is control?
A control is a component that provides UI (user interface) capabilities.

What is component?
Component is a group of related classes and methods.

What is globalization and localization?
Globalization is the process that the application support multiple culture and region, localization support a given culture and region.
What is overloading and overriding
Overloading means the class contains two or more methods with name and different signature, in overriding method name should be same and also same signature.

What is business logic?
Business logic is the functionality that handles the exchange of information between data base and user interface.

What is global assemble cache (GAC)?
GAC allows .Net applications to share libraries.GAC solve the problem of DLL Hell.

What is logging?
 Logging is the process of represent the information about the status of an application.
 
What is assembly?
Assembly is the primary unit of deployment of managed code it can be either DLL or .exe.

What is private assembly?
Private assemble is used by the single application.

What is shared assembly?
A shared assembly is used by the one or more application on a machine.

What is digital signature?
Digital signature is an electronic signature which is used to verify the identity of the person who is sending the message.

What is garbage collection?
Garbage collection is the process of remove the object which is not used for the longer time.


What is location of global assemble cache (GAC) on the system
C:\windows\assembly

What is difference between .tostring(), convert. Tostring()?
Difference both of them is that “convert” function handles Nulls while .tostrong() does not handle Null reference exception error.

What is collation?
Collation refers to set of rules that determine how the data is stored and compared

What is the difference between authorization and authentication?
Authorization is the process of allow or deny the resources to the particular user while the authentication is the process of identifying the credentials of user like username, password etc.
 





No comments:

Post a Comment