Thursday, January 12, 2017


1. Difference between multicast delegate and event
Ans : Click Here

2. Difference between static method call and instance method call using reflection
Ans :  In case of instance method call we to pass object while in case of staic method call we to pass null instead of object.

3. CompareTo method with Lowercase and uppercase string.

What  will be the value of i?

string  a = "F"
string b= "f";

int i = a.CompareTo(b);

Ans : It will return -1 if a is smaller than b
It will return 1 if a is greater than b
It will return 0 if a is equal to b.

In case of string it compare on ASCII values.

4. How can you create dynamic interfaces?
Ans : Using Reflection (System.Emit) class.

5. Difference between STA and MTA
Ans: Click Here

6. Why MTA option is not available in WPF?
Ans: Microsoft tried to go with MTA in WPF but could not due to incompatibility of old com component.

7. How delegate maintain function call? Someone is adding function and someone is removing function?
And : Delegate are immutable.

8. What else delegate store apart from function address?
And : object

9. If you have not source code of an interface and you want to add one function declaration than how you can?
Ans : You can do the same job by using dynamic keyword.

10. If two classes has same name method and you have to create an object which can call both class method than how will you do that?
Ans : Can achieve that using dynamic keyword.

11. How can we use multiple core of CPU while using thread?
Ans: While using task classes they used multiple core of CPU but can't do that explicitly.

12. Which Pattern support multiple factory?

13. What is thread affinity?
Ans : Click Here

14. How can you create thread safe singleton object without using lock statement
Ans. using Nested classes

15. How tables are stored in memory?
Ans : Database are stored in .mdf file (Measurement data file). .mdf file are binary file.

No comments: