Pages

Showing posts with label DotNet-Resources. Show all posts
Showing posts with label DotNet-Resources. Show all posts

Dot Net interview questions


Dot Net Framework
What is the difference between private and shared assembly
Accessibility by applications.
Shared assembly has to be Strong Named, have version and culture.
Installed in GAC.

What does Reflection do?
Runtime type discovery
Load Assemblies
Dynamic Invocation

What is an "IS" operator?
Equiv of Type

I PC
lWhich one of the following correctly initializes the ThreadStart object myStart?
1 ThreadStart myStart = new ThreadStart();
2 ThreadStart myStart = new ThreadStart(myThread);
3 ThreadStart myStart = new ThreadStart(DoSomething());
4 ThreadStart myStart = new ThreadStart(DoSomething);
5 ThreadStart myStart = new ThreadStart(this);

lHow to achive synchronization in .NET?
lUsing lock(object) statement for the critical section.
l
l
l

What is Thread Pool?
lCollection of threads

lWhy\how to do multithreading?
oTo compute operations in parellel.
o
o By acquiring threads from ThreadPool class.

When you call the Thread.Start method on a thread, will it start immediately?
That thread does not start executing until the current thread yields or is preempted by the operating system



Dot Net interview questions

Warm Up Questions
Is “string” value or reference type?
It is a reference type. string is an alias of String

Is int[] counter is a value or reference type?
Arrays are intrincically derived from System.Array.

Is Nullable types are value or reference type?
All nullable types are of Type System.Nullable struct

Is it possibe to define a variable of type
Nullable> number;
int ?? number;

Rapid Fire Round


Why Generics?
Allows to design class or method that defer the specification of one or more types until used by client.

Avoids Boxing and Unboxing (Performance)

Avoids Runtime exceptions (type safety)

Better programming (Code reuse)

What type would return if “is” operator is used on
List counterList = null;

Underlying type will be returned not the Nullable type.


The very Basics (Not Visual Basic)




Can delegates added to invocation list be changed?
NO

Does delegates are invoked once for each time they appear in the invocation list?
Yes it does.

Can multiple catch blocks be executed?
No.

Can return statement in try block make finally block called?
Yes.