Interview Questions - WorkShop (250 Questions and Answers) PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

Mr.

RN REDDY
.Net Interview (250)
Questions and Answers

.NetFrameWork
What
Face book
Id: is .Net Framework?
A).

https://www.facebook.com/groups/rnreddytechsupports/
Gmail

.NET Framework is an important integral component in .NET software.


Id:
[email protected]
.Net
Framework is a runtime environment, which we can use to run .net

MicroSoft.Net Interview Questions


1. .Net Framework
2. C#.Net
3. ASP.Net
4. ADO.Net
5. Project Related Questions
6. HR Questions

1)What is .Net Framework?


A)

NET Framework is an important integral component in .NET software.


.NetFramework is a runtime environment,which we can use to run .net
applications.

2) What is Visual Studio.Net?


A) Visual Studio .NET is a Microsoft-integrated development environment (IDE)
that can be used for developing console applications, Windows Applications, Web
Applications, Windows Service, Web service.. And so on...

3) Difference between .Net Framework and VisualStudio.Net?


A)
.NET FRAMEWORK
1. It is a run- time environment, which
we can use to run applications.
2. It is required for .net developers and
.net application end users
3. It is a free ware which we can
download from Microsoft Website.

VISUAL STUDIO .NET


1. It is a development environment,
which we can use to develop
applications.
2. It is required for only .net developers.
3. It is not free way which we have to
purchase from Microsoft.

4) What is CLR?
A)
CLR stands for Common Language Runtime, it is .net execution.
CLR is a common execution engine for all .NET Languages that means
every .NET language application has to execute with the help of CLR.

5) Explain .net application Execution process?


Diagram for .net application execution process :
A) .Net application Execution process can be divided into 2 steps:

Step1. Converting HIGH level language code into MSIL (Microsoft Intermediate
Language) with the help of language compilers because .Net execution engine
(CLR) can understand only MSIL code.
Step2. JIT (JUST-IN-TIME) compiler will convert MSIL code to NATIVE code
because operating system can understand only NATIVE code or MACHINE code.

6) What is JIT Compiler?


A) JIT (JUST-IN-TIME) Compiler will convert MSIL (Microsoft Intermediate
Language) code to Native code because operating system can understand only
Native code or machine code.

7) What is CLS?
A) 1. CLS (Common Language Specifications) is a set of common language
standard defined by the Microsoft for all .NET Languages.
2. Every .NET Language has to follow CLS Standards.
3. Whenever a Programming Language wants to recognize as .NET Language then
it has to follow CLS.

8) What is CTS?
A)
CTS (Common Type System) is a subset of CLS. It is a set of common
based data types defined by Microsoft for all .NET Languages.
2. Every .NET Language has to map their data types with CTS types.

9) What is MSIL Code?


A) Microsoft Intermediate Language (MSIL), is one of the Core component of the
.NET Framework. Any .NET source codes written in any .net supportive language
(C#, VB.net etc), when compiled are converted to MSIL. This MSIL, when
installed or at the Runtime, gets converted to machine code. The Runtime
conversion of MSIL code to the machine code is handled by a component called as
the Just In Time (JIT) Compiler.

10) Explain the role of Garbage collector?


A) In .NET, MEMORY MANAGEMENT is handling by GARBAGE
COLLECTOR (GC). GC is an integral part of CLR.
To perform memory Management GC will do 2 duties.
1.Allocating the Memory
->When new object is created by application garbage collector will allocate
memory for that object with in Managed heap.

2. De-Allocating the Memory:->When an object is not using by the application garbage collector will
recognize it as unused object..and garbage collector will destroy unused objects
according to generation algorithm.

11) What is Managed Code and Unmanaged Code?


.Net application may contain 2 types of codes.
A) Managed Code
B) Unmanaged Code
A) Managed code:
The code which is taking the help of CLR for execution is called as managed
code.
Example for Managed Code:All .net languages code is managed code.
VB.Net code, C#.Net codeetc
B) Unmanaged code: The code which is not taking the help of CLR for execution is called as
Unmanaged code..
Example for Unmanaged Code:In .net application non .net code is unmanaged code..
VB Code, VC++ Code

Note: - .net application can contain non .net code.

C#.Net
1. Why C#.Net?
A) To develop any type of application by using .NET we require one .NET
LANGUAGE to write the business logic of that application.

2. Explain about primitive data types?


A) In C#.NET, according to the type of the data and size of the data, data types are
classified into 5 types.
They are
1. Numerical Data types
a) Signed Numerical data types:
sbyte, short, int, long
b) Unsigned Numerical data types;byte, ushort, uint, ulong
2.Floating
float, double, decimal
3.Character related Data types
a) Char
4.Logical Data Types
a) bool
5. General data Types
a) string
b) object
These data types are called as PRIMITIVE DATA TYPES.

3. What is the MaxValue and MinValue?


A) MaxValue and MinValue are predefined constants, which are members of every
primitive data type structure except bool.
. Using this Constant we can get the MINIMUM value and MAXIMUM value of a
data type.

4. Difference between value types and Reference types?


A)
VALUE TYPES
1.In value types, data will storing in
STACK MEMORY
2. Value type variable can contain the
actual data.
3. In primitive data types except General
data types are called VALUE TYPES.
They are Numerical, Floating, Character
and Logical.
Ex: Int, Long, Char
4. Structures and Enums are value types

REFERENCE TYPES
1. In this, Data will be storing in HEAP
MEMORY.
2. Reference type variable will contain
the address of the data.
3. In primitive data types only General
data types will come under
REFERENCE TYPE.
EX: String, Object
4. Class, interface, delegates come under
this.

5. When we will go for signed data types and when we will go for
unsigned data types?
For Example:When we will go for sbyte
When we will go for byte
A) Whenever we want to allow both positive and negative values then we will go
for signed data types.
Whenever we want to allow only positive values then we will go for unsigned data
types.
Here sbtye is a signed data type and byte is an unsigned data type.

6. What is the output?


static void Main (string [] args)
{
Char c='a';
int j=c;
Console.WriteLine (j);
Console.ReadLine ();
}

Output: 97
7. Can I assign 1 or 0 into bool variable?
static void Main(string[] args)
{
bool b = 1;
Console.WriteLine(b);
Console.ReadLine();
}

A) No.
8. What is the output ?
static void Main(string[] args)
{
bool b = true;
Console.WriteLine(b);
Console.ReadLine();
}

OUTPUT: True

9. Can we assign null value into value type variable?


A) No.
but we can assign null values into reference type variable.

10. How to assign null value into value type variable?


A) We have to go for NULLABLE VALUE TYPES.
Syntax: <ValueType> ? <VariableName>=NULL;

11. When we will declare particular variable as nullable type?


A) Whenever an input is an optional that means not compulsory then we can
declare particular variable as NULLABLE TYPES.

12. What is implicit typed variable when we will go for implicit


typed variable?
A)
Using var keyword we can declare IMPLICIT TYPED VARIABLE.
IMPLICIT TYPED VARIABLE can have any data type value and this
variable will be converting into particular data type based on the value
which is assigning.
Whenever we r unable to expect the type of value which is going to assign.

13. What is the difference between GetType() and typeof()?


A)
typeof()
1. It will return the given data type
base type
2. It is a operator

GetType()
1. It will return the given variable
data type base type
2. It is a method

14. What is the output?


static void Main(string[] args)
{
var a = 10;
var b = 10.5;
Console.WriteLine(a.GetType());
Console.WriteLine(b.GetType());
Console.ReadLine();
}

OUTPUT: System.Int32
System .Double
15. What is implicit type casting? When we will go for explicit type
casing?
A) IMPLICIT TYPE CASTING: - Converting from Smaller size data type to
bigger size data type is called as IMPLICIT TYPE CASTING.
When EXPLICIT TYPE CASTING: - The type casting which is not possible by
using implicit type casting then we have to go for EXPLICIT TYPE CASTING.

16. Difference between Parsing and Converting?


Parsing
1. Using parsing we can convert from
only string data type to any other data
type except object data type.

Converting
2. Using converting we can convert
from any data type to any other
data type.

17. What is the output?


static void Main(string[] args)
{
string s1 = "1234";
string s2 = "1234.5";
string s3 = "rama";
string s4 = null;
string s5 = "12321321321323232132132332";
int res;
res = int.Parse(s1);
Console.WriteLine(s1);
//res = int.Parse(s2);
//res = int.Parse(s3);
//res = int.Parse(s4);
//res = int.Parse(s5);
Console.ReadLine();
}

OUTPUT: 1234
18. Difference between int.Parse() and Convert.Toint32()?
A)
Int.Parse()
1.Using this we can convert from only
STRING to INT.
2.When we are parsing if the string
variable contains NULL value then this
parsing technique will throw argument
NULL EXCEPTION.

Convert.ToInt32()
1.Using this we can convert from any
data type value into INT.
2.When we are converting if the string
variable contains NULL value then it
will convert that NULL as ZERO.

19. What is Boxing and Unboxing?


A)
BOXING: - It is the process of converting from VALUE type to
REFERENCE type.
Ex: converting from int to object
UNBOXING: -It is the process of converting from REFERENCE type to
VALUE type.
EX: converting from object to int.

20. What is the difference between Convert.ToString() and


Tostring()?
A) Convert.ToString() handles NULL values even if variable value become
NULL.
.Tostring() will not handles NULL values it will throw a NULL reference
exception error.

21. What is the difference between string and StringBuilder?


A)
STRING

STRING BUILDER

1. When we implement modifications to


the existing String object within
memory it will create a new object.
Because string is IMMUTABLE.

1. When we implement modifications to


the existing StringBuilder object will not
create new copy of object instead of that
it will modify the existing object.
Because StringBuilder is MUTABLE.

2. String will allocate a new memory


whenever we concatenate the string
value

2. StringBuilder class will have a


method Append() this method is used to
insert the new value on the existing
value.
so the usage of string builder is more
efficient in case of large amount of
string

EX: String s1=sathya;


S1=s1+Tech;
Console.WriteLine(s1);

3. It will occupy more memory, it will


decrease the performance of
applications.

EX: StringBuilder s1=new


StringBuilder(sathya);
S1.Append(Tech);
Console.WriteLine(s1);
3. It will occupy less memory, it will
improve the performance of
applications.

For Example:static void Main(string[] args)


{
string s1 = "Hydera";
Console.WriteLine(s1.GetHashCode());
s1 = s1 + "bad";
Console.WriteLine(s1.GetHashCode());
Console.WriteLine(s1);
StringBuilder s2 = new StringBuilder("Hydera");
Console.WriteLine(s2.GetHashCode());
s2.Append("Bad");
Console.WriteLine(s2.GetHashCode());
Console.ReadLine();
}

22. What is Error, Bug and Defect?


A) Error --> Which comes at the time of development.
Bug --> Which comes at the time of testing. (Pre-Release)
Defect --> Which comes in Production. (Post-Release)

23. Why class and object?


A) CLASS: To achieve ENCAPSULATION, as well as for modularity
OBJECT: To allocate memory for instance variables & to store the address of
instance method.

24. When we will go for instance variable?


A) Whenever we required a filed for multiple objects with the different values,
then particular variable we will declare as INSTANCE VARAIBLE.

25. When we will go for static variable?


A) According to the requirement whenever the value is common for all the objects
then particular variable will declared as STATIC.

26. Difference between instance variable and static variable?


A)
INSTANCE VARIABLE
(or)
NON-STATIC VARIABLE
1. A variable which is declared within
the class and outside the method
WITHOUT using STATIC keyword is
called as INSTANCE VARIABLE.
2. Instance variable will create multiple
times for every object creation.
3. Instance variable value will be
differs from one object to another
object.

STATIC VARIABLE
(or)
CLASS VARIABLE
1. A variable which is declared inside
the class and outside the method by
using STATIC keyword is called as
STATIC VARIABLE.
2. Static variable will create only once
when the class is loading.
3.satic variable value will be same for
every object

27. When we will go for readonly?


A) Whenever filed is required for every object with the different value, but the
value not required change.
Ex: - EmpNo

28. When we will go for static readonly? Difference between static


variable and static read only?
A) Whenever we want to have common value for every object and value should
not be changed forever we will go for static readonly.

STATIC VARIABLE
1. Value will be common for all objects
but value can be changed

STATIC READONLY
1. value be common for all objects but
value cant be changed

29) Difference between constant, static and read-only?


A)
CONSTANT
1.const keyword is used
2. Its value cannot be
changed
3. By default constant is
static that means we dont
require to use any static
keyword
4. Constant value should
be initialized at the time
of declaration which we
cannot initialize in
runtime.

STATIC VARIABLE
1. static keyword
2. Its value can be
changed
3. For static variable,
programmer has to
declare as static

READONLY
1.Readonly keyword
2.Its value cannot be
modified
3.By default Non-static

4. Static variable can be


initialized at the time of
declaration as well as we
can initialize in runtime
within the static
constructor.

4. Readonly can be
initialized at the time of
declaration or runtime
(only within the
constructor)

30) When the memory will be allocated for instance variable and
static variable?
A) STATIC VARIABLE: - At the time of class is loading, memory will be
allocated for static variable.
INSTANCE VARIABLE: - When the object is created the memory is allocated
for instance variable.

31) What is the purpose of constructor and method?


A) Purpose of Constructor: To initialize at the time of creating an object for
Instance variable as well as at the time class is loading for static variable.
Purpose of Method: To perform operations on state.

32) When we will go for instance method?


A) To perform operations on Instance variables.

33) When will go for static method?


A) While defining method if that method is not required to access instance
variables we will define particular method as static method.

34) If a class is having one static constructor and one instance


constructor which constructor will call first?
A) First control will execute STATIC constructor because CLASS will load first
then OBJECT will create.

35) Why static constructor is a parameter less constructor?


A) Static constructor executes at the time of class loading. There is no need to pass
values explicitly, so it doesn't have parameters.

36) What are the default access modifiers?


A) Default access modifier of class members is private.
Default access modifier of a class is internal.

37) What is the super class for all.net classes?


A) OBJECT Class

38) When object class constructor is calling?


A) When we call instance constructor first it will call object class constructor.

39) How constructor calling mechanism will work?


A) Constructor is calling from BOTTOM to TOP, but it is executing TOP to
BOTTOM.

40) What is this and base?


A) this: It is a keyword which is representing current class object or instance.
Using this we can invoke current class instance members.
Base: It is a keyword which is representing the super class instance.
Using base keyword we can access super class instance members from derived
class or sub class.

41) How to invoke super class constructor?


A) base()

42) How to invoke current class constructor?

A) this()
43) What is constructor overloading?
A) Implementing multiple constructors within a single class with different
signature (Different no. of parameters or Type of parameters or Order of
parameters) is called CONSTRUCTOR OVERLOADING.

44) What is constructor chaining?


A) Whenever one class constructor is invoking another class constructor which is
called as constructor chaining.
For this we can use Base()

45) Why Main() is static?


A) When we run the application CLR has to invoke the Main(). If the Main() is a
instance method again it requires object.
To overcome this Main() is defined as static method.

46) Main() and static constructor in same class which one will
execute first?
A) STATIC CONSTRUCTOR

47) What is passing parameter mechanism? How many types?


A) Passing a value to a function is called as PASSING PARAMETER
MECHANISM.
C#.Net will support passing parameter mechanism in 3 ways.
1. Call by value (or) Pass by value
2. Call by reference (or) pass by reference
3. Call by Out (or) pass by out

48) When call by value, call by reference, call by out?


A) CALL BY VALUE: Whenever we want to pass some value to a function and
the modifications are not expecting to reflect back to actual parameter then we will
pass it as CALL BY VALUE.
CALL BY REFERENCE: Whenever we want to pass some value and we are
expecting the modifications should be reflected back to actual paramer then we
will pass it as CALL BY REFERENCE
CALL BY OUT: Whenever we dont want to pass any values but we are
expecting back the modifications then we will pass particular parameter as CALL
BY OUT.

49) Difference between call by ref and call by out?


A)
CALL BY REFERENCE
1.Ref keyword is used
2. Ref parameter should have some
value.
3. Whenever we want to pass some
value and we are expecting the
modifications should be reflected back
then we will pass it as CALL BY
REFERENCE

CALL BY OUT
1.Out keyword is used
2. Out parameter is not required to have
value.
3. Whenever we dont want to pass any
values but we are expecting back the
modifications then we will pass
particular parameter as CALL BY OUT

49) What are oops principles?


A)
1. Encapsulation
2. Abstraction
3. Inheritance
4. Polymorphism

50) What is Encapsulation? How can we achieve?


A) Wrapping STATES and BEHAVIOURS are called as ENCAPSULATION.

Or
Binding VARIABLES and METHODS is called as ENCAPSULATION.
By implementing class we can achieve ENCAPSULATION.

51) What is abstraction? How can we achieve?


A) Abstraction means HIDING.
Abstractions are 2 types.
1) data abstraction:Hiding unwanted data is called as data abstraction
2) Method abstraction:Invoking required method and hiding unwanted method is called as method
abstraction.
With the help of FUNCTION OVERLOADING we can achieve Method
ABSTRACTION.

52) What is Inheritance? Types of Inheritance?


A) Inheriting or deriving members from one class to another class is called as
INHERITANCE.
C#.Net will support 5 types of Inheritance. They are
1. Single Inheritance
2. Multi-level Inheritance
3. Multiple Inheritance
4. Hierarchical Inheritance
5. Hybrid Inheritance.

54) Is C#.Net will support multiple Inheritance?


A) In C#.NET multiple inheritances is not possible by using classes, which is
possible with the help of INTERFACES.

55) What is sealed class? When we will go for sealed class?


A) While defining a class, if we have used sealed keyword then that class can be
called as SEALED CLASS. It cannot be inherited.
Whenever we want to restrict to inherit a class we can go for sealed class.

56) Difference between static class and sealed class?


A)
STATIC CLASS
1. It can contain only STATIC
members.
2. It cannot be instantiated.
3. STATIC keyword is used.
4.Cant be inherited

SEALED CLASS
1. It can contain both STATIC and
INSTANCE members.
2. It can be instantiated(we can create
object for sealed class)
3. SEALED keyword is used.
4. Cant be inherited.

57) Difference between class and structure?


A)
CLASS
1. It is reference type
2. When we create an object for class it
will be allocated into HEAP
MEMEORY
3.To define a CLASS, class keyword is
used
4. It will support inheritance
5.Instance field intailzers are allowed

STRUCTURE
1. It is value type
2. When we create an object for
structure it will be allocated into
STACK MEMEORY
3. To define a STRUCTURE, struct
keyword is used
4. It will not support inheritance
5. Instance field intializers are not
allowed.

6.It can contain explicit default


constructor
7. We cant create an object for class
with out using new keyword.
8. We can have static, abstract, sealed
class.
9.We can implement overloading and
overrding with in class

6.It cant contain explictit default


constructor
7. We can create an object for structure
with out using new key word if it is not
having instance varibles.
8. We cant have static, abstract, sealed
structure.
9. We can implement overloading with
in structure, but we cant implement
overriding with in structure.

58) Why property?


A) 1.To assign value to a class level variable after creating object to retrieve the
value from class level variable individually.
2. Property will provide SECURITY to variable data.
3. Property will provide VALIDATION FACILITY for variable data at the time
of Assigning.

59) Difference between constructor and property?


A)
CONSTRUCTOR
1. It is used to initialize the instance
variables at the time of creating an
object.

PROPERTY
1. It is used to assign value to class level
variables as well as can retrieve the
value from class level variables.

60) What is polymorphism? Types of polymorphism?


A) Polymorphism means one name many forms. Implementing multiple
functionalities with the same name is called POLYMORPHISM.
It is of 2 types:
1. Static Polymorphism (or) Compile Time Polymorphism
2. Dynamic Polymorphism (or) Runtime Polymorphism

61) What is static polymorphism and dynamic polymorphism?


A) STATIC POLYMORPHISM:
A method which will bind at compile time will execute in runtime is called as
static polymorphism or early binding or compile time polymorphism
DYNAMIC POLYMORPHISM:
A method which will bind at compile time will not execute, instead of that a
method which will bind at runtime will execute is called as RUNTIME
POLYMORPHISM (or) DYNAMIC POLYMORPHISM is nothing but LATE
BINDING.

62) What is function overloading? When we will go for function


overloading?
A) FUNCTION OVERLOADING: Having multiple methods with the same
name but a different no. of arguments or different type of arguments or different
order of arguments in a single class or in a combination of base and derived class.
WHEN: Whenever we want to implement same method with the different
functionalities then we have to go for FUNCTION OVERLOADING

63) Can we overload static methods?


A) YES.

64) What is function overriding? When we will go for function


overriding?
A) FUNCTION OVERRIDING: Having multiple methods with the same name
and with the same signature in a combination of base and derived class.
WHEN:
Whenever we want to implement a method in multiple classes with the different
behavior we can go for method overloading.

65) What is method hiding?


A) Hiding the SUPER CLASS method within the SUB CLASS by using new
keyword as called as METHOD HIDING.

66) Can we override static methods?


A) NO. We cannot define static method as VIRTUAL, OVERRIDE and
ABSTRACT.
Because FUNCTION OVERRIDING is depending on OBJECT or INSTANCE

67) What is the output?


class bc
{
internal virtual void display()
{
Console.WriteLine("bc display");
}
}
class dc : bc
{
internal override void display()
{
Console.WriteLine("dc display");
}
}
class tc : bc
{
internal new void display()
{
Console.WriteLine("tc display");
}
}
class Program
{
static void Main(string[] args)
{

bc b = new dc();
b.display();
b = new tc();
b.display();
Console.ReadLine();
}
}

OUTPUT: dc display
bc display
68) Difference between function overloading and function
overriding?
FUNCTION OVERLOADING
1. Multiple methods with the same name
and different signature.
2. It can implement in a single class and
combination of base and derived class.
3. No keywords are used
4. Both functions return types can be
same or differ.
5. It is a compile time polymorphism
6. We can overload static methods
7. Constructors can be overload.

FUNCTION OVERRIDING
1. Multiple methods with the same name
and same signature.
2. To implement override we should go
for base and derived class, we cannot
implement in single class.
3. virtual in base class and override in
derived class
4. Both functions return types should be
same.
5. It is a Run time polymorphism
6. We cannot override static methods
7. Constructors cannot be overload.

68) When we will go for abstract class?


A) Whenever we want to implement some methods in current class and some
methods we want declare in current class which we want to implement in future
classes then we have to declare that class as abstract class.

69) When we will go for interface?


A) Whenever we want to declare all the members in current class and want to
implement all the members in future classes then we will declare particular class as
interface.

70) Why we cant create object for abstract class and interface?
A) Not required
Because is abstract class is a partial implemented class and interface has no
implementation.
Even though these abstract class abstract members and interface members should
implement within the derived classes.
Due to that reason we dont required to create object for abstract class and
interface.
We will create an object for derived class and using that object we can access
abstract members and interface members.

71) Difference between abstract class and interface?


A)
ABSTRACT CLASS
1. It is a collection of abstract members
and non-abstract members.
2. While defining an abstract class,
abstract keyword is used.
3. It is partially implemented
4.we can implement with in a method,
property(Normal method or Normal
property)
5.it can contain fields
6.it can contain constructor
7. While implementing abstract class
members with in the derived class we
have to use override keyword.

INTERFACE
1. It is collection of abstract members,
that means by default interface members
are abstract.
2. While defining an interface, interface
keyword is used.
3. No implementation
4. We cant implement a property and
method.
5.it cant contain fields
6.it cant contain constructor
7. While implementing interface
members with in the derived class we
dont required to user override key
word.

72) Benefits of oops?


A) 1. Reusability
2. Extensibility
3. Re-implementation
4. Modularity
5. Easy to modify
6. Easy to implement real world programming
7. Security

73) What is an exception?


A) Run time error is nothing but and exception.

74) Why exception handling mechanism?


A) To handle runtime error, when a runtime error is occurred to avoid abnormal
termination by displaying user-friendly error messages.

75) What code we will write within try, catch and finally blocks?
A) TRY BLOCK: We have to write the statements which may throw an error.
CATCH BLOCK: We will write the statements to display user friendly messages
to the user to give more clarity to the user regarding error.
FINALLY BLOCK: We will write ERROR FREE code or CLEAN UP code that
means the statements which we want to execute irrespective of error occurrence.

76) Can we have multiple catch blocks and if yes when we will go for
multiple catch blocks?
A) Yes. Whenever we want to handle multiple errors we have to go for
MULTIPLE CATCH BLOCKS.

77) What is super class for all .net exception classes?


A) Exception class

78) What is a delegate? Types of delegates?


A) It is similar like C++ function pointer. Delegate object can hold the address of a
function and can invoke a function. Delegates are reference types.
Delegates are of 2 types
1. Single cast Delegate and
2. Multi Cast Delegate

79) In C# which is called as type safe function pointers? Why?


A) In C#.Net, DELEGATES are called as TYPE SAFE FUNCTION POINTERS
because Delegate declaration should follow the method declaration which is
holding by the delegate object.

80) What is language Independency? Is .NET language independent


technology?
A) .Net is supporting for multiple languages. While developing an application by
using one .net language we can use another .net language component.
For example:While developing C#.Net application we can use vb.net component. As well as
while developing VB.Net application we can use C#.Net component.
Due to that reason we can say that .net is a language independent technology.

81) What is an assembly? Types of assemblies?


A) An Assembly is a unit of code which provides versioning and deployment.
Assemblies are of 2 types:1. Private Assembly and 2. Shared Assembly

82) Difference between dll and exe?


A)
exe
1. exe stands for EXECUTABLE
2.File extension will be .exe
Ex;-hello.exe
3.exe file will have an ENTRY point

dll
1. dll stands for DYNAMIC LINK
LIBRARY.
2.File extension will be .dll
Hello.dll
3.dll file will not have an ENTRY point

called main()
4. exe is SELF EXECUTABLE. Exe
itself is an application.

5. Collection of classes which has


Main() will produce exe files.
Ex: .Net Console application

called main()
4. dll is not a self executable, it is
reusable component. It will depend on
some other application for execution for
execution.
5. Collection of classes which is not
having Main() will produce dll files.
Ex: .Net class library project.

83) Difference between private assembly and shared assembly?


A)
PRIVATE ASSEMBLY
1. An assembly which is providing
services to SINGLE client application at
a time is called as
PRIVATE ASSEMBLY
2. It will create a local copy within
every client application folder, that local
copy will provide the services to
concern client application.

SHARED ASSEMBLY
1. An assembly which is providing
services to MULTIPLE client
application at a time is called as
SHARED ASSEMBLY
2. It will not create a local copy, it will
provide services to multiple client
application from a centralized shared
folder called GAC.

84) What is GAC?


A) GAC stands for GLOBAL ASSEMBLY CACHE. IT is a residence for all
SHARED ASSEMBLIES. When we install .NET software, GAC folder will create
within the following path
C:\Windows\Assembly

85) What is strong name? How to create strong name?


A) It is one of the .NET Framework utility, which is representing with a file called
sn.exe.
Using this utility we can give a strong name or public key to the given assembly.
Strong name or public key will give uniqueness to given assembly among
collection of assemblies.

86) How to install an assembly into GAC?


A) GAC UTILITY:
It is represented with a file called GACutil.exe. Using this utility we can install an
assembly into GAC folder
Syntax:- D:\\gacutil i <assemblyname.dll> (Press enter)
Example:- D:\\gacutil i myassembly.dll (Press enter)
Here i stands for INSTALLING
The above command will install myassembly.dll into GAC folder.

87) What signing assembly?


A) Informing about created strong name to the assembly is nothing but signing the
assembly.

88) What is satellite assembly?


A) An assembly which we can use to develop multi lingual applications in .net.

89) What are Multilingual applications?


A) An application that supports for more than one human readable language is
known as multilingual application.

90) What is Reflection?


A) Reflection is used to get the information about an assembly programmatically
by writing some code.

91) How to implement Reflection in .net?


A) System.Reflection
System.Type

92) What are smart arrays in C#.Net?


A) In C#.Net, INDEXERS are called as SMART ARRAYS because accessing
array with the help of indexers will be faster.

93) What is enum? What is the default data type of enum?


A) Enum is a value type. It is a collection of constants that means it is a collection
of string constants which are representing collection of integer constants.
Int is the default data type of enum.

94) Why generics?


A) Generics allow us to define type-safe data structures, without committing to
actual data types. It means it allows the programmer to decide the type of
parameter in RUNTIME or CONSUMPTION TIME.

95) What we are achieving by using generics?


A) We can avoid function overloading in some level.

96) Can we create normal object for generic class?


A) NO. We CANNOT create a normal object for Generic class.

97) Can we pass 2 different type values to generic function?


A) YES.

HOW :
Class myclass
{
Internal static void print <T, K> (Ta, Kb)
{
}
}
Class program
{
Void Main ()
{
Myclass.print<int, string> (10,sathya);
Console.ReadLine ();
}
}

98) How many types of collections?


A) Collections are of 2 types:
1. Normal Collection and
2. Generic Collection

99) What is dictionary?


A) 1.The Dictionary class is a generic class and can store any data types.
2. It is a collection of Pairs.
3. Each pair will have 2 elements: 1. Key value and 2.Item Value.
4. Every item should be represented with one unique key value.

100) How to add summary to a method?


A) If we want to add a method comment you can just place your cursor on an
empty line above one of your method and insert 3 slashes which will insert a
comment block for you to fill out.

101) Can we call message box with in console application.


A) Yes.
1. Start a new project - File -> New Project -> Console Application -> OK.
2. On Solution Explorer - right click on References and click Add Reference.
3. Scroll down the list until you find "System.Windows.Forms", click it and then
click OK
4. Now under all the using _____s add this to the code window:
Using System.Windows.Forms;
5. Now go to the main function
MessageBox.Show ("Hello World");
6. Now go to Debug -> Start without Debugging.

102) what is partial class? Why partial class?


A) 1. While defining a class, if we have used partial keyword which can be called
as PARTIAL CLASS.
2. Partial class will split into multiple class files but the class name will be same
but class files names should be differ.
WHY: According to the requirement, whenever multiple resources wants to work
on single class then we can declare particular class as a PARTIAL CLASS.
Ex:In asp.net
Webform1 is a partial class
1) Webform1.aspx:- Here we will write the business logic
2) Webform1.aspx.desgigner.cs:- Here we will write the designing logic.

103) what is a thread?


A) Thread is an independent execution path, it able to run simultaneously with
other execution paths.

104) what is the base class library for threading?


A) System.Threading

105) How to create thread?


A) Whenever we want to create a thread, we have to create an object for thread
pre-defined class.
Thread thr1=new Thread ();

106) How to invoke a thread?


A) Using thr1.Start ();
Start(): It is a pre-defined member method of thread class. Using this method we
can invoke or start a thread.

107) What is threadstart()?


A) 1. Threadstart() is a pre-defined delegate, which is a part of System.Threading
base class library.
2. We can initialize a method to thread with the help of ThreadStart().

108) How to send a thread for sleep?


A) Using Thread.sleep(), we can send a thread for sleep according to the given
time. Sleep() method is used to Block the current thread for the specified number
of milliseconds. In other words
We can include specific time via thread.sleep() method like as:
Thread.Sleep (TimeSpan.FromHours (1)); // sleep for 1 hour
Thread.Sleep (1000);
// sleep for 1000 milliseconds

109) How to suspend a thread?


A) Using Suspend() we can suspend the targeted thread. When you call
Thread.Suspend() on a thread, the system notes that a thread suspension has been
requested and allows the thread to execute until it has reached a safe point before
actually suspending the thread. A safe point for a thread is a point in its execution
at which garbage collection can be performed.
Once a safe point is reached, the runtime guarantees that the suspended thread will
not make any further progress in managed code. A thread executing outside
managed code is always safe for garbage collection, and its execution continues
until it attempts to resume execution of managed code.

110) How to call back suspended thread?


A) Suspended thread can be called back by using resume().

111) How to terminate thread?


A) The Thread.Abort() method is used to start the process of terminating the
thread. we are calling this method usually terminates the thread. it raised a
System.Threading.ThreadingAbortException in the thread on which it is invoked.

112) what is the scope of protected Internal?


A) If we declare a class or class member access modifier as protected internal
which can be accessed by all the classes of CURRENT PROJECT and DERIVED
CLASSES of other projects within that application.

113) How to call Garabge collector?


A) Using GC.Collect();
The garbage collection class provides the GC.Collect(); which you can use to give
your application some direct control over the garbage collector. In general, you
should avoid calling any of the collect methods and allow the garbage collector to
run independently.

114) Difference between dispose() method and finalize() method?


A) These are just like any other methods in the class and can be called explicitly
but they have a special purpose of cleaning up the object.
DISPOSE(): In the dispose method we write clean up code for the object. It is
important that we freed up all the unmanaged recources in the dispose method like
database connection, files etc.
The class implementing dispose method should implement IDisposable interface.
A Dispose method should call the GC.SuppressFinalize method for the object it is
disposing if the class has desturctor because it has already done the work to clean
up the object, then it is not necessary for the garbage collector to call the object's
Finalize method.
FINALIZE(): A Finalize method acts as a safeguard to clean up resources in the
event that your Dispose method is not called. You should only implement a
Finalize method to clean up unmanaged resources. You should not implement a
Finalize method for managed objects, because the garbage collector cleans up
managed resources automatically. Finalize method is called by the GC implicitly
therefore you can not call it from your code.
Note: In C#, Finalize method cannot be override, so you have to use
destructor whose internal implementation will override the Finalize method in
MSIL. But in the VB.NET, Finalize method can be override because it does
support destructor method.

ASP.Net
1. What is ASP.Net? Why asp.net?
A) 1. ASP.NET is a .NET web technology or Server side technology.
WHY: To develop a web application by using .Net we have to use a .Net web
technology called Asp.Net and a .Net language called C#.Net.

2. What do you mean by server side technology?


A) 1. The code which is executing within the WEB SERVER is called as
SERVER SIDE CODE.
2. Server side code we can implement by using Server side technologies.
Ex. ASP, ASP.NET, JSP, PHP and so on
3. Using server side technology we can develop server side web pages.

3. What do you mean by client side technology?


A) 1. The code which is executing within the WEB BROWSER is called as
CLIENT SIDE CODE.
2. Client side code we can implement by using client side technologies.
3. Ex: JavaScript, HTML, CSS

4. What are the programming techniques will be supporting by


asp.net?
A) Asp.net will support 2 Programming Techniques. They are1. InPage Technique and
2. CodeBehing Technique.

5. Can we convert client side control as a server side control? Can


we convert server side control as client side control?
A) Yes. We can convert Client side control as server side control by adding an
ATTRIBUTE called runat=server.
But we cannot convert server side control as client side control.

6. How can you pass values between ASP.NET pages?


A) Different techniques to move data from one web form to another are:
1. Query string
2. Cookies
3. Session state
4. Application state
5. Cross page postback
6. Context.Handler object

7. What is the difference between Response.Redirect() and


Server.Transfer()?
A) Response. Redirect():
1. It is used to navigate the user request between multiple web servers.
2. It will not hide the Destination url address.
Server. Transfer():
1. It is used to navigate the user request within the web server.
2. It will hide the Destination url address.

8. Explain about validation controls in asp.net?


A) There are 6 Validator Controls. They are
1. Requiredfield Control
2. Compare validator
3. Range validator
4. Regular Expression validator
5. Custom validator
6. Validation summary

9. When we will go for custom validator control?


A) Whenever our validation requirement is unable to achieve with the help of
existing validation controls then we have to go for CUSTOM VALIDATOR
CONTROL.

10. How to invoke server side validation function and how to invoke
client side validation function?
A) Server side validation functions can be invoked by using ASP.NET and Client
side validation function are invoked with the help of JavaScript and HTML.

11. How to access information about a users locale in ASP.NET?


A) Users locale information can be accessed through
System.Web.UI.Page.Culture property.

12. What are the life cycle events of asp.net?


A) Application level, Control level, Page level.

13. What are the Asp.Net page cycle stages?


A) There are overall 8 stages available for any webpage that will undergo with in
server at page life cycle.
1) Page Request
2) Start
3) Page Initialization
4) Load
5) Validation
6) PostBack Event Handling
7) Rendering
8) Unload

14) What are page life cycle events?


A) 1. Page_PreInit
2. Page_Init
3. Page_InitComplete,
4. Page_PreLoad
5. Page_Load
6. Page_LoadComplete
7. Page_PreRender
8. Page_PreRenderComplete,
9. Page_Unload

15. In asp.net page life cycle events which will fire first?
A) Page_PreInit

16) What is the difference between event and method?


A) Event will execute for some action i.e called as event firing or event calling or
event executing.
Whereas method will contain some behavior or functionality.

17) What are the default events of controls Button and Textbox?
A) Default events of:
Button: CLICK Event
TextBox: TEXTCHANGED Event

18) What do u mean by postback?


A)When ever user request for a page for first time it is called First request.
When ever user will interact the page by clicking button or selecting radiobutton
e.t.c again one more request for the same page that is called postback request.

19) What is Ispostback? When we will use Not Ispostback?


A) IsPostBack: It is the property of the Page class which is used to determine
whether the page is posted back from the client.
When: Whenever we dont want to execute the code within the load event, when
the page load event fires then we will use (!IsPostBack).

20) What is AutopostBack? when we will set Autopostback=true?


A) Autopostback is the property of the control. If you want a control to postback
automatically when an event is raised, you need to set the AutoPostBackproperty
of the control to True.

21) Difference between web user control & custom control?


A)
WEB USER CONTROL
CUSTOM CONTROL
1. It will provide services to single web 1. It will provide services to multiple
applications.
web applications.
2.Its file is represented with *.ascx
2.Its file is represented with *.dll file
3. If we want to develop a web user
3. If we want to develop a custom
control we have to add a pre-defined
control we have to use a class library
template called web user control to the
project.
solution explorer of the application
4. Web user control we have to drag
4.Custom control we have to drag from
from solution explorer window to web
toolbox window to web page.
page.

22) How to get the current date to textbox?


A) TextBox1.Text = DateTime.Now.ToString();

23) How to divide the page into different parts?


A) By using div tag and panel control.

24) What is Rendering?


A) Rendering is a process of converting complete server side code into client
understable code. It will happen before page is submitting to the client.

25) What is the difference between ASP and ASP.Net?


A)
ASP
1. Asp is a classic server side
technology before .NET
2. Asp will support only ONE
programming technique called INPAGE
TECHNIQUE(writing both
(design/logic) code in the single file

ASP.NET
1. Asp.Net is a .Net advanced server
side technology.
2. Asp.Net will support 2 programming
techniques i.e INPAGE and
CODEBEHIND technique

called NOTEPAD)
3.In Asp, its file extension is .asp
4. Asp uses mostly VBScript, HTML
and JavaScript
5. Asp has limited OOPs support.

3.In Asp, its file extension is .aspx


4. Asp.Net uses any .Net languages
including VB.Net, C# but mostly
C#.Net.
5. ASP.NET uses languages which are
fully object oriented languages like C#

26) What is the parent class for all asp.net web server controls?
A) System.Web.UI.Control.

27) How many types of memories are there in .net?


A) Two types of memories are there in.net.
1. Stack memory and
2. Heap memory

28) D/B client side and server side scripting?


A)
Client Side Scripting
1. Scripting which will execute within
the web browser can be called as client
side scripting.
2. Using this we can implement client
side validations.
3. Client side scripting we can
implement by using client side
technologies called JavaScript, VB
script and so on.

Server Side Scripting


1. Scripting which will execute within
the web server can be called as client
side scripting.
2. Using this we can implement server
side validations.
3. Server side scripting we can
implement by using server side
technologies called Asp.Net, JSP, PHP
and so on.

29) When we will go for gridview customization?


A) Whenever we want to display the Gridview control according to our
requirement then we will go for Gridview Customisation.

30) What is AutoGenerateColumns property?


A) It is a Boolean property of gridview control.
By default it is true.
If we want to customize gridview control..we have to set it as false.

31) List out directories in Asp.Net?


A) Page, Register, Master, Control

32) What are the major built in objects in asp.net?


A) Application, Request, Response, Server, Session.

33) When we will go for master page?


A) Whenever we want to have common header and common footer within multiple
pages of a website then we can go for a Master Page.

34) When can we use xml control?


A) Whenever we want to display the data from XML document to the user then we
can use XML control.
NOTE: To fetch the data from XML document, XML control will depend on
XSLT(Extensible Style sheet Language Transformation) file.
XSLT file will be acting as a mediator between XML control and XML document.

35) When can we use wizard control?


A) Whenever we want to accept multiple inputs from the user in STEP by STEP
process we can use WIZARD CONTROL.

36) When can we use adRotator control?


A) Whenever we want to display the collection of images in a rotation manner one
by one then we will go for Adrotator control.

37) How view and Multiview controls will work?


A) View and multiview are container controls.
Multiview control: It can contain collection of view controls but not a normal
control.

View Control: It can contain normal controls, but view control should be placed
within the multiview.
By implementing view and multiview control we can reduce the no. of pages.

38) What are the config files we have in asp.net?


A) In ASP.NET we have 2 types of Configuration files. They are1. Web.Config and
2. Machine.config

39) What is web.config file? How many web.cofig can contain a


single application?
A) 1. Web.Config is one of the configuration files.
2. It is a XML file.
3. This file we can use to define the ASP.NET application configuration settings.
We can have MULTIPLE Web.Config files within a single application.

40) Can we declare more than oneconnection string in web.config


file?
A) YES. But the connection string names must be different.

41) When we will go for multiple web.config files?


A) Whenever we want to define some separate settings for couple of web pages,
we will create a new folder and we will add that couple of web pages to that folder
and we will add a new Web.config file to that new folder and we will define that
separate settings within that Web.config.

42) What is the importance of machine.config? How many


machine.config files?
A) The Machine.Config file, which specifies the settings that are global to a
particular machine.
Machine.config file is used to configure the application according to a particular
machine. That is, configuration done in machine.config file is affected on any
application that runs on a particular machine. Usually, this file is not altered.
We can have only ONE machine.config files.

43) What is the Difference between Hyperlink button and Link


Button?
A) Hyperlink: It will not PostBack the webpage to the server.
Link Button: It will postback the webpage to the server.

44) What is State Management? Why?


A) STATE MANAGEMENT: It is a process of maintaining the users
information.
WHY: Asp.Net web application is depending on HTTP protocol which is a
STATELESS protocol that means it cannot remember previous user information.
Solution for this problem is STATE MANAGEMENT.

45) How many types of state management?


A) We can implement STATE MANAGEMENT in 2 ways.
1. Server Side State Management and
2. Client Side State Management.

46) What is client side state management? How many types?


A) Storing the users information within the WEB BROWSER memory or
CLIENT MACHINE is called as Client Side State Management.

47) What is server side state management? How many types?


A) Storing the users information within the WEB SERVER memory is called as
Server Side State Management.

48) What is a session? How many types of sessions?


A) Session is a temporary variable which will be used to maintain the user
information.
Based on the locations, sessions are of4 types:
1. Inproc session
2. State server session
3. Sql server session
4. Custom session

49) What is the default type of session data?


A) OBJECT.

50) What is the default life time of session variable?


A) 20 Minutes.

51) Where we will define the session state type?


A) Within the Web.config , under the <System .Web> TAG.

52) What is the Default Session state mode?


A) The default Session state mode is INPROC.

53) How to set the life time of session variable?


A) Using TimeOut property.

54) How to destroy session?


A) Using Abondon(). i.e Session.Abondon() will destroy the session.

55) What are the advantages of inproc session and disadvantages?


A) ADVANTAGES OF INPROC SESSION:

1. Accessing the inproc session data will be faster.


2. It is very much suitable for small web applications
DISADVANTAGES OF INPROC SESSION:
1. It we restart the web server or if any crashes to the web server there is a
chance of losing the session data.
2. If the session data is increased there is a burden on the web server, it will
affect the performance of web server and web application.
3. It is not suitable for large web application models like webgarden and
webfarm.

56) What are the advantages of state server session and


disadvantages?
A) ADVANTAGES OF STATE SERVER SESSION:
1. State server session will provide more security because sessions are creating
separately within the windows service.
2. If we restart the web server or if any crashes to the web server but still session
data will be safe.
3. It is suitable for large web applications like webgarden and webfarm model.
DISADVANTAGES OF STATE SERVER SESSION:
1. Accessing the state server session will be slower compare with inproc
session.
2. It is not that much suitable for small web applications because maintaining
the windows service is expensive.
3. Always windows service should be ON.

57) Where inproc session data will store?


A) Inproc sessions are creating within the Current App Domain, which is a part of
Web Server.

58) Where state server session will store?


A) State server session are creating within the state server which is nothing but
Windows Service, this windows service is representing by a file called
(AspNet_state.exe).

59) How to start windows service?


A) We can start the Windows Service in 2 ways1. By using control panel and
2. By using Command prompt.

60) Where sql server session will store?


A) Sql server sessions will be creating within the Sql Server Database.

61) What is the framework tool will user to create aspstate database
with in sqlserver?
A) aspnet_regsql

62) What are the session related events?


A) There are 2 Types of Session events.
1. Session Start and
2. Session End.

63) When we will go for session concept?


A) Whenever we want to store user data within the server.

64) What is worker process?


A) Worker process is nothing but Asp.Net execution engine or Asp.Net runtime.
The role of Asp.Net runtime is executing the Asp.Net web page within the Web
server.

65) What is appdomain?


A) Every worker process will maintain a memory unit within the web server which
is nothing but Appdomain.

66) What is application pool?


A) It is part of web server or a unit of web server.

67) What is webgarden?


A) An application pool which is having multiple WORKER PROCESS is called as
WEB GARDEN.

68) What is webfarm?


A) Deploying a website into multiple web servers is called Webfarm.

69) Why inproc session is not suitable for webgarden and webfarm
model?
A) Inproc sessions will create within the current App Domain due to that reason
app domain data is not sharable due to that reason Inproc sessions are not suitable
for WEB GARDEN and WEBFARM MODELS.

70) When we will go for application state?


A) when ever we want to store the data in web server..which should be common
for all users.
For example:
In youtube video number of views

71) What are application events?


A) There are 3 application events.
1. Application Start Event
2. Application End Event
3. Application Error Event.

72) Difference between session state and application state?


A) 1. Application state: It will be available to all users of the application.
2. Application state variables are cleared, when the process hosting the application
is restarted.
Session state:
1. It will only be available to a specific user of the ASP.net application.
2. Session state variable are cleared, when the user session times out. The default is
20 minutes. This is configurable in Web.Config.

73) What is global.asax file?


A) This is a class file, which is coming with 1 user defined called Global and it has
a super class called HTTPApplication. This file will contain all the application
session related events.

74) What is a cookie?


A) Cookie is a variable which we can use to store the user data.
It will create within the client machine due to that reason which is called as client
side state management.

75) What is the default life of cookie?


A) 30 Minutes.

76) Types of cookies?


Cookies can be broadly classified into 2 types
1. Persistent cookies: Remain on the client computer, even after the browser is
closed. You can configure how long the cookies remain using the expires property
of the Http Cookie object.
2. Non-Persistent cookies: If you don't set the Expires property, then the cookie is
called as a Non-Persistent cookie. Non-Persistent cookies only remain in memory
until the browser is closed.

77) What is the Scope of Cookie?


A) Throughout the website.

78) What is the Difference between Cookie and Session?


A)
COOKIE
1. Cookie is a client side state
management technique.
2. Cookie is a variable which will create
within the client machine.
3. Default timeout of a cookie is 30
minutes.

SESSION
1. Session is a server side state
management technique.
2. Session is also a variable which will
create within the Web server.
3. Default life time of session variable is
20 minutes.

79) What is querystring? What is the draw back?


A) 1.QueryString is a way to forward the data from one web page to another.
2. QueryString is attached to the URL with "?".

Drawbacks: 1. All the attributes and values are visible to the end user. Therefore,
they are not secure.
2. There is a limit to URL length of 255 characters.

80) What is Viewstate? What is the scope of view state?


A) 1. Viewstate will maintain the users data among multiple postbacks requests.
2. View state will store the users data within client machine due to that reason it is
called as CLIENT SIDE STATE MANGEMENT.
3. The scope of the Viewstate is within that web form.

81) Is HTML controls will maintain Viewstate?


A) NO. Because HTML controls are Client side controls.

82) What is Hiddenfield and what is the scope?


A) 1. HiddenField is a Server side control, which can hold the user data but
holding the data will not be visible because it is a INVISIBLE CONTROL.
2. To Implement HiddenField we can use Asp.Net server control called
HiddenField.

83) What is caching?


A) Caching is a process of storing the frequently used web page (or) frequently
used part of the web page (or) frequently used data into some location for future
access.

84) How many locations we can implement caching?


A) According to the location caching is classified into 4 types.
1. Client caching
2. Proxy caching
3. Reverse caching
4. Web server caching

85) What are types of caching techniques?


A) Asp.Net will support 3 Caching Techniques.
1. Page Output Caching
2. Fragment Output caching
3. Data Caching

86) When we will go for page output caching?


A) Whenever we want to store the frequently used web page into some location
then we will go for PAGE OUTPUT CACHING.
In general, we will implement page caching on startup page such as login and
home page.

87) When we will go for fragment caching?


A) Whenever we want to store the frequently used part of the web page into some
location for future access then we will go for FRAGMENT CACHING.
Fragment caching we will implement on a Web user control, which is accessing
by multiple web pages.

88) When we will go for data caching?


A) Whenever we want to store the frequently used data for future access into some
location then we will go for DATA CACHING.

89) What is class we will use to access global connection string?


A) ConfigurationManager class.

90) What is security?


A) Security is a process of allowing the authenticated users and denying the
unauthorized users when user is requested for restricted web page.

91) What is authorization?


A) Authorization is a process of verifying the authentication ticket and supplying
the web page based on authentication ticket.

92) What is Authentication?


A) Authentication is a process of accepting the user credentials, when user will
request for a restricted web page and generating the authentication ticket for the
valid user.

93) How many types of authentications will support by asp.net?


A) It will support 3 types of authentications.
1. Forms authentication
2. Passport authentication
3. Windows authentication

94) What is returnurl?


A)it is querystring varible

95) What is the class we will use for forms authentication?


A)FormsAuthentication
96) When we will go for forms authentication?
A) Forms authentication is used for normal web applications.

97) When we will go for passport authentication?


A) A group of websites which will allow the user with single user id and password
will go for the passport authentication.
Ex: If we have Gmail id with that we can access Gmail, Facebook, Youtube etc

98) When we will go for windows authentication?


A) Whenever users are part of the same Windows domain as the server then the
Windows Authentication is the preferred approach to authentication.
In other words, whenever we have intranet web applications it is better to go with
Windows Authentication.

99) List out Gridview events?


A) 1. Row deleting and Row deleted
2. Row editing
3. Row updating and Row updated
4. Row Cancelling edit
5. Row command
6. Row created
7. Row DataBound
8. Page index changing and page index changed
9. Sorted and sorting.

100) What is the use of sqldata source control?


A) SqlData Source will make the programmer task easy to communicate SqlServer
Database.

101) When we will go for repeater control?


A) Whenever we want to display the data as it is we can go for Repeater control,
that means we dont require to provide any Edit or Delete facilities.
Ex: To display Bank Statements and Examination results.

102) When we will go for datalist control?


A) Whenever we want to display the data in a repeating list format then we will go
for Datalist control.

103) When we will go for formview and when we will go for details
view?
A) FORMVIEW: Whenever we want to display record by record in VERTICAL
manner then we can go for Formview.
Details View: Whenever we want to display record by record in HORIZONTAL
manner then we can go for Details view.

104) What is the use of data pager control?


A) Data pager control provides paging functionality for data bound controls.

105) Difference between listbox and dropdownlist?


A) LISTBOX: It will allow the user to select one item or multiple items.
DropDownList: It will allow the user to select only one item.

106) where is the viewstate information stored?


A) Within the html hidden fields.

107) which are the 2 properties are on every validation control?


A) 1.ControlToValidate and
2.ErrorMessage.

108) what is the use of @register directives?


A) It informs the compiler of any custom server control added to the page.

109) what is the textbox property used for password textbox?


A) TextMode

110) How to reduce the burden on the page?


A) By implementing paging.

AJAX
1) Why Ajax?
A) To avoid full page postback,to implement partial page postback
1. Using AJAX we can develops RICH USER INTERFACES web applications
2. If we want to follow ASYNCHRONOUS REQUEST MODEL, while
developing the web applications we have to use AJAX.
3. To improve the PERFORMANCE of the web application and to reduce the
NETWORK TRAFFIC we can use AJAX.
4. We can avoid SCREEN FLICKER using AJAX.

2) What is partial post back?


A)when ever user will interact the part of the page then sending postback request
for only that part of the page

3) What is synchronous request model and what is asynchronous


request model?
A) Synchronous Request Model: In this model, every client request has to
communicate the web server and every request has to process by the web server
then only that request, response will be getting by the client.
Asynchronous Request Model: In this model, between client and web server we
will have a middleman called AJAX ENGINE.
AJAX ENGINE: It is a part of web browser. The role of AJAX engine is to
process the part of the web page or partial web page within the client side.

4) What is client centric and what is server centric?


A) AJAX will support 2 programming models. They are:
1. Server Centric programming model: In this model every client request will be
processing by the web server that can be first request or postback request.
2. Client Centric programming model: In this model, first request will be
processing by the web server and postback request will be processing by the client.

NOTE: While developing an AJAX web page we can implement only server
centric programming model or client centric programming model or both within
single web page.

5) Explain about extender controls? And non extender controls?


A) AJAX Toolkit is providing 2 types of controls.
1. EXTENDER CONTROLS:
1. Extender controls are not individual controls i.e these controls will not provide
any functionality individually.
2. Extender controls will extend the functionalities of existing ASP.NET controls.
3. Ex: Autocomplete extender, calendar extender, dropdown extender and so on..
2. NON-EXTENDER CONTROLS:
1. Non Extender controls are individual controls i.e every non-extender controls
will provide some individual functionality.
2. Non Extender controls provides the extra controls in ASP.NET.
2. Ex: Accordion and Accordion pane, Tab Container, Rating, Nobot.

6) What is the importance of script manager and update panel


control in Ajax?
A) IMPORTANCE OF SCRIPT MANAGER:
1. In Ajax, Script Manager is the main important parent control.
2. Whenever we are developing an Ajax web page first we have to drag and drop
SCIRPT MANAGER Control.
3. These control class will provide all the AJAX related METHODS and
PROPERTIES.
IMPORTANCE OF UPDATE PANEL:
1. Update panel is one of the Ajax Container control.
2. By default Asp.Net control follows Server Centric Programming Model
Whatever controls we are adding to update panel will execute Client
Centric Programming Model.
3. Whenever we want to make Asp.Net controls to follow Client Centric
Programming Model.
4. We can drag and drop update panel, in that we can add Asp.Net controls and
Ajax controls.

ADO.Net
1).What is ADO.Net? Why Ado.net?
A) ADO.NET : 1. It is an integral component in .NET framework, which was
introduced by the Microsoft with .NET Framework 1.0
2. It is a Data Access Object, which allows communication between .NET
application and Databases.
WHY: 1. whenever .NET application wants to communicate Databases it has to
take the help of Ado.Net.
2. Ado.net acts like a mediator between .Net application and Database.

2). Difference between Connected Oriented Architecture (COA) and


Disconnected Oriented Architecture (DOA)?
A)
COA
1. Whenever we require a continuous
connection with the Database for
accessing the data we use COA
2. In COA, SqlDataReader will fetch
the data from database and bind to the
Client application.

DOA
1. Whenever we doesnt require a
continuous connection with the
Database for accessing the data we can
use DOA.
2. In DOA, SqlDataAdapter will fetch
the data from database and store into
the DATASET in the Client
application.

3).What is the base class library used for ado.net?


A)System.data To communicate Sql server database we have to import a Base
Class Library called Using System.Data.SqlClient;

4).What are components required for connected oriented?


A) The components required for Connected oriented architecture are:
1. Connection Object
2. Command Object
3. DataReader Object

5). What are the components required for Disconnected oriented?


A) The components required for Disconnected oriented architecture are:
1. Connection Object
2. Command Object
3. DataAdapter Object
4. Dataset Object
6). Difference between DataReader and DataAdapter?
A)
DATAREADER
DATAADAPTER
1. It is used in Connected Oriented
1. It is used in Disconnected Oriented
Architecture.
Architecture.
2. DataReader is represents with a
2. DataAdapter is represented with a
pre-defined class called
pre-defined class called
SqlDataReader.
SqlDataAdapter.
3. DataReader is used to retrieve a
3. DataAdapter is used to retrieve data
read-only, forward-only stream of
from a data source and populate tables
data from a database
within a DataSet.

7).Difference between dataset and data table?


A)
DATASET
1. Dataset is a collection of DATA
TABLES.

DATA TABLE
1. Data table represents a single table
i.e it is a collection of rows and
columns.

8).Difference between data reader and dataset?


A)
DATAREADER
1. It is used in Connected Oriented
Architecture.
2. DataReader is directly accessing the

DATASET
1. It is used in Disconnected Oriented
Architecture.
2. Dataset is a local database which is

central database.

3. DataReader is represented at a time


single record. DataReader is Read
only, Forward only, connected recoed
set.
4. DataReader we will use only when
we want to read the data from Central
DataBase.

not communicating the central


database directly, between the central
db and local db there will a mediator
called DataAdapter for
communication.
3. Dataset can contain collection of
tables because dataset itself is a local
database.
4. We can use dataset for reading the
data, inserting, updating and deleting
the data.

9) When we will go for connected oriented architecture and when we


will go for disconnected oriented architecture?
A) Connected Oriented Architecture (COA):
Whenever we require a continuous connection with the Database for accessing
the data then we will go for COA.
DISconnected Oriented Architecture (DOA):
Whenever we doesnt require a continuous connection with the Database for
accessing the data then we will go for DOA.

10) How to bind the data to textbox?


A) Txtbox1.Text=dr[0];

11) How to bind the data to grid view?


A)Gridview1.datasource=dr;
A) Gridview1.databind();

12) How to bind the data to label?


A)label1.Text=dr[0];

13) How to bind the data to dropdownlist?


A)dropdownList1.datasource=dr;

dropdowList1.DataTextField=dr[1];
dropdownList1.DatavalueField=dr[0];
dropdownList1.DataBind();

14) Difference between ExecuteReader, ExecuteNonquery,


ExecuteScalar?
A) ExecuteReader(): It is apre-defined member method of SqlCommand class.
This method will read or fetch the data from the central database and will return to
DataReader object.
ExecuteNonQuery(): This method will execute the Non-Query command of
command object CRUD Operations like INSERT, UPDATE, DELETE, CREATE
and so on. Then it will return the no. of records which are affected by the
command.
ExecuteScalar(): This method will executes the command object command till the
first match. This method will avoid the unnecessary scanning of the table, which
improves the performance of the application.

15) How to destroy connection object explicitly?


A) conn.Dispose()

16) What is row command event? When we will go for row


command event?
A) Row Command event is one of the events of the Gridview control.
This event will fire when user will click any button within the Gridview control.

17) Can I implement link button click event within gridview?


A) Yes.

18) How to create delete, edit, select buttons with in gridview?


A) By using
PROPERTY
AutoGenerateDeleteButton
AutoGenerateEditButton
AutoGenerateSelectButton

BUTTON
For DELETE Button
For EDIT Button
For SELECT Button

19) Which data bound control will support to create insert button
by using property?
A). Listview control

20) What is the data provider to communicate sql server data base?
A) Every DataProvider is providing by the Microsoft as a Base class library
(BCL).
To communicate Sql server database we have to import a BCL called Using
System.Data.SqlClient;

21) What is 3 tier?


A) A software solution which is implemented by using 3 layers can be called as 3Tier Architecture.
In 3-Tier architecture, we have 3 layers
1. I-Layer: It will contain the UI-Design and Validations Code is known as
PRESENTATION LAYER (UI).
2. II-Layer: It will contain the Business Logic layer code and is known as
BUSINESS LOGIC LAYER (BLL).
3. III-Layer: It will contain the Data Access Code and is known as DATA
ACCESS LAYER (DAL).
In 3-Tier Architecture, UI interacts with BLL only
BLL will interacts with DAL
DAL interacts with DATABASE.

22) What is windows service?


A) 1. Windows service in one of the software application.
2. It works only on windows operating system due to that reason windows service
is called operating system dependent application.
3. It will start when the windows OS is Booting.
4. It will run till the windows OS is Running.
5. It will stop when the OS is Shutdown.
6. It can be start and stop manually also.

23) What is web service?


A) 1. A unit of code which is providing the services to multiple client applications
can be called as WEB SERVICE.
2. An application which is receiving the services can be called as SERVICE
RECEIVER or CLIENT APPLICATION.
3. An application which is providing the services can be called as SERVICE
PROVIDER or WEB SERVICE.

24) What is WPF?


A) 1. WPF stands for Windows Presentation Foundation.
2. It is a .Net advanced windows technology, introduced by Microsoft with .Net
Framework 3.0 in 2006.
3. Using WPF we can develop an advanced windows applications.
4. WPF is integrated with 2D graphics, 3D graphics, animations and multimedia.
5. Whenever we want to implement animations within a desktop application the
best choice is WPF.

25) What is silverlight?


A)SilverLight is an advanced web technology which we can use to implement
animations, multimedia for asp.net web application

26) What is Jquery?


A) 1. Jquery is an advanced technology of JavaScript that means jquery is next
generation of JavaScript.
2. It is a predefined JavaScript Library.
3. It is a group of JavaScript predefined functions.
4. It is a lightweight and more powerful API adding dynamic behavior for
webpage.
5. To implement JavaScript programmer has to write the multiline code. But
using Jquery we can implement JavaScript.

27) What is Linq?


A)Linq stands for Language Integrated Query.
Linq is an advanced data access object for .net .

28) What is Crystal Reports?


A) 1. Crystal Reports is one of the third party Reporting Tool. Using this tool, we
can generate the reports.
2. If we want to use Crystal reports in Visual studio 2010 then we have to install
crystal reports software explicitly from the following site:
WWW.sap.com

29) What is the base class library for crystal reports?


A) CrystalDecisions.CrystalReports.Engine;

30) Can we run asp.net application without IIS?


A) Yes. Using ASP.NET DEVELOPMENT SERVER which is the default server
in ASP.NET.

31) Why virtual directory?


A)to provide security for web application

32) What is the default server we will get with asp.net?


A) ASP.NET DEVELOPMENT SERVER.

33) Why constraints?


A) Constraint is a condition which we can assign on a single column or multiple
columns.
Constraints will maintain consistent data within the database.

34) What is the importance of primary key?


A)To avoid duplicate values and null values in a column.

35) What is the importance of foreign key?


A) 1. To establish relation between Parent table and Child table we require a
common column , that column should be parent table primary key column.
2. To make that relation strong we require Foreign key constraint that means
Foreign key constraint we should assign child table common column.

36) What is stored procedure?


A) 1. Stored procedure is a pre-compiled Sql statements.
2. That means stored procedure will contain sql statements like SELECT,
UPDATE, DELETE and so on which is already compiled.
Syntax:
Create procedure procedurename (<Parameter list>)
As
Begin
{
<Sql statements>
}
end

37) What is advantage of stored procedure?


A) By implementing stored procedures we can avoid the multiple time compilation
of Sqlcommands.

Project Related Questions


1. Tell me list of all your projects.
2. Tell me about your current project
3. Tell me about the architectures of your project
4. Tell me about the modules in your project
5. Tell me about the what are .Net features used in your current project
6. Tell me about your role and responsibility in current project
7. Tell me about what process models and types
8. Tell me about which model are you used in current project
9. Tell me about your SDLC and what phases exist in that.
10.Tell me about what kind of documents exist and details about them
11.How do you maintain the configuration of your project Like how do you
maintain the version of your project TFS
12.How do you start and plan your work
13.What is most challenging work in your career?
14.What is the toughest situation you faced in the development
15.How often you communicate with the client
16.For what purposes, you communicate with the client
17.Explain complete process followed for the development
18.What is the life cycle model used for the development
19. How do communicate with team members
20. How do you say you are having excellent team management skills
21. If your client gives a change and asks for early delivery. How will you
manage?
22. How will gather requirements and where do you record. Is it in word / Excel
or do you have any tool for that
23. What is the stage when code is delivered to the client and he is testing it?
24.How do you handle change requests
25.How do you write unit test cases?

HR Questions
1. Why u r looking for change your job?
2. Where are you working now?
3. What is your IT experience?
4. What is your relevant experience?
5. What is your Current CTC Cost to company
6. What is your Expectation?
7. What is your company notice period?
8. What are your roles in your current project?
9. What is your PAN Card Number?
10.What is your Employee Id in your Current Company?
11.What is your official mail id?
12.Is Your notice period is Negotiable?
13.Why youre changing from your current company?
14.Why youre looking for change?
15.Are you a permanent Employee or contract?
16.How do you get your salary?(consolidated checks)
17.Are you willing to relocate?
18.Tell me about your company?
19.Who are the clients to your company?
20.Who is your project leader?
21.What is your expected salary
22.What is reason to leave the current company
23.What is your Notice period
24.What is your strength
25.What is your weakness
26.Where can you see you after 5 years
27.What are your habits
28.What is your appraisal process - Hike
29.Why did you enter this field
30.What have you done 2004 2007
31.Do you have valid passport
32.Do you visit any client place so far?

33.Tell me About work experience


34.Are you willing to relocate
35.When will you join
36.Why do u what to change from current organization
37.Why do you want to join this organization
38.What are your weaknesses / areas of improvement

You might also like