Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • List of Top 36 .net Interview Questions - PART 1 OOPS Concept?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 31
    Comment on it

    Hi,

     

    Here are the list of interview questions asked in .Net technologies.

     

    Let's categorize it: 

     

    OOPs Concepts

    1. What is difference between abstractions and encapsulation ?
    2. How do we achieve encapsulation in c# ?
    3. What is difference between abstract class & interface?
    4. Can an abstract class has a constructor ?
    5. What is the need of constructor in abstract class?
    6. Can you create an instance of an abstract class?
    7. Where did you create abstract class in your last project and why?
    8. How many abstract classes have you created in your project?
    9. What are the advantages and disadvantages of abstract classes?
    10. What is method overloading and method overriding or what is polymorphism ?
    11. what is the use of override & new key words over method implementation?
    12. When you create a class how do you find which methods should be override ?
    13. How do you find your base classes; give an example from your latest project?
    14. What is a constructor ?
    15. what is the use of private constructors?
    16. what is the use static constructor ?
    17. suppose you have a class X and it's inherited by class Y and you create the instance of class Y both X and Y have their own constructors. Which class's constructor will call first?
    18.   continue with X and Y we have same method named abc() in both classes which returns string "I am X" and "I am Y" respectively. and now you create the object of class by referencing class X what would be the abc return ? See below code 
    19. public class X{
         public X()
         {
         }
         public string abc(){return "Hi, I am X";}
      }
      
      public class Y{
         public Y()
         {
            public new string abc(){return "Hi, I am Y";}
         }
      }
      
      Public class Main(){
         public static void main()
         {
             X y = new Y();
             console.WriteLine(y.abc());
         }
      
      }
    20. what would you do to get child class method's value?

    21. How do you achieve multiple inheritance in c#?

    22. Why does c# not support multiple inheritance with class type? What is the diamond  problem?

    23. What are the static classes ? why we need static class?

    24. Does static class has get initiated ?

    25. Can you write non-static methods with in a static class?

    26. How do you prevent a class to not get inherited or what is the purpose of sealed class?

    27. Why we need sealed key word when we have private constructor ?

    28. Why we use static classes how many static classes do you created in your project and why ?

    29. What design pattern have you used in project ?

    30. what is singleton pattern where we need to use singleton pattern?

    31. Advantages and disadvantages of singleton pattern ?

    32. What is repository pattern and unit of work & advantages and disadvantages of repository pattern?

    33. what is factory pattern ? advantages and disadvantages of factory pattern?

    34. What is SOLID principles ?

    35. What is Dependency injection & inversion of controls ?

    36. What framework you use to implement DI and how to implement that?

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: