C# developer interview questions with answers.
What is a delegate?
- A strongly typed function pointer.
- A light weight thread or process that can call a single method.
- A reference to an object in a different process.
- An inter-process message channel.
Answer :
1. A strongly typed function pointer.
How does assembly versioning in .NET prevent DLL Hell?
- The runtime checks to see that only one version of an assembly is on the machine at any one time.
- .NET allows assemblies to specify the name AND the version of any assemblies they need to run.
- The compiler offers compile time checking for backward compatibility.
- It doesn't.
Answer :
2. .NET allows assemblies to specify the name AND the version of any assemblies they need to run.
Which .Gang of Four. design pattern is shown below?
public class A {
private A instance;
private A() {
}
public
static A Instance {
get
{
if ( A == null )
A = new A();
return instance;
}
}
}
- Factory
- Abstract Factory
- Singleton
- Builder
Answer :
3. Singleton
In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?
- TestAttribute
- TestClassAttribute
- TestFixtureAttribute
- NUnitTestClassAttribute
Answer :
3. TestFixtureAttribute
Which of the following operations can you NOT perform on an ADO.NET DataSet?
- A DataSet can be synchronised with the database.
- A DataSet can be synchronised with a RecordSet.
- A DataSet can be converted to XML.
- You can infer the schema from a DataSet.
Answer :
2. A DataSet can be synchronised with a RecordSet.
In Object Oriented Programming, how would you describe encapsulation?
- The conversion of one type of object to another.
- The runtime resolution of method calls.
- The exposition of data.
- The separation of interface and implementation.
Answer :
4. The separation of interface and implementation.
No comments:
Post a Comment