Interview Question


1.Program for Singleton pattern.
2.What is private constructor and static constructor.
3.What do you mean by static?
4.When do you prefer static constructor.
5.What you write in static constructor.
6.Thread safety while creating Singleton pattern.
7.How you implicitly call Static Constructor.
8.What if static variable value is not assigned to that variable and you try to access it.How do you avoid such scenarios.
9.Design a Logger Framework.
10.Thread safety in Logger class.
11.Can you define const variable as a static.
12.How to you create a thread in a class for calling logger class to log particular data in your log file.
13.Program cc= new Program();//How do you stop other classes while they try to create an instance of class Program.
14.What are the difference ways to create a thread.
15.Can static constructor access all the members of a class?
16.when would a static constructor be called?
17.How to do you explicitly call a static constructor.
18.can static class have static constructor.
19.When would you use an abstract class an when would you use an interface?
20.Can i have a abstract class having no abstract method.
21.Why does c# not allow us to inherit from 2 or more classes?
22.Though C++ and C# are similar but why not Microsoft allowed us to have multiple inheritance ?Two reasons?
23.Is finally is thread safe if you use Lock?
24.What is string builder?Do you use a static String builder or non static string builder in your logger class.

25.Can we write static in const variable?

Constant variable cannot be marked as Static. const is implicitly static, so you don't use both keywords together.

26.Can const variable be declare as non static?
27.Is finally will be part of any lock if you just assign a lock on a particular method.
28.Can you write a framework which will allow logger class to execute logging in a parallel process.
29.How do you distribute your logger framework to other applications?
30.What are the difference ways to create a thread?
31.What is Visual Tree and Virtual tree?
32.What is a dependency property in WPF?
33.What is attached property?
34.What are different kinds of layout panels ?
35.Can i have a multiple grid inside a window?
36.Advantage of WPF over Winforms?
37.Could you please explain about MVVM?
38.What is VIew?
39.What is Model?
40.Why we need VIewModel?
41.Design a WPF form for a cricket team having there flags left hand side of the screen and respective flag data on right hand size of the screen by using MVVM model?
42.Class structure for View and VIew Model?
43.How to do you use services.


Please comment your answer below...

Comments

  1. 25. Constant variable cannot be marked as Static. const is implicitly static, so you don't use both keywords together.

    ReplyDelete

Post a Comment

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???