C# – Interviews Questions

  1. What is Abstract class?
  2. Can we do the inheritance with the combination of Abstract and Interface?
  3. About multiple inheritance?
  4. Use of genarics?
  5. SOLID Principles?
  6. Depandancy Injection?
  7. Partial class?
  8. Can we create the object for Abstract class & Reason?
  9. Do we have constructor in Abstract?
  10. Can we declare the properties and variables in Abstract?
  11. Default access modifiers for class and class members ?
  12. Why do we have to impliment SOLID Principles , Interface and abstract classes in proramming?
  13. Repository pattern?
  14. Use of Interfaces and we have 2 interfaces with 2 same method names, how will you invoke 2nd interface method?
  15. Diff b/w arraylist and list?
  16. Who will write boxing and unboxing using arraylist?
  17. Examples on ref and out keywords?
  18. LINQ query to know salary is greater than 1000?
  19. Difference between static and singleton
  20. OOPS Concept? brief on polymorphism?
  21. Refactoring in C#?
  22. C# current version?
  23. Difference b/w abstract and interface with scenarios ?
  24. What is repository ?
  25. Why interfaces(How internally it works)?
  26. Over loading and overriding?
  27. Realtime example on abstraction and encapsulation?
  28. Readonly and constant?
  29. Differenceerence between Value type and reference type?
  30. Garbage Collector?
  31. Difference between dinctionary and hashtable ?
  32. What is copy constructor?
  33. Reverse a string word “welcome to” to “emoclew ot”
  34. What is Global Assembly Cache ?
  35. What is Encapsulation?
  36. Write a program to show polymorphism?
  37. Write a program to find 5 factorial?
  38. Difference between constant and read only?
  39. Difference between Value type and reference type?
  40. What is interface? why we call it interface why not we can call it a class?
  41. Function Overloading Vs Function Overriding?
  42. What are Extension methods?
  43. Design Patterns(Abstract and Factory)?
  44. IEnumerable vs IEnumerator?
  45. Constructors and types?
  46. What is stuff functions?
  47. Multiple catch block? then which block will fire first?
  48. Examples of Polymorphism other than Overloading and overriding?
  49. Can GAC be same name ?
  50. Can we define protected members in interface? 
  51. IDispose vs finalizer()?
  52. Use of Static Class and Methods?
  53. What is LinQ and differ from foreach? Namespace for LinQ, Can we use LinQ on DataSet?
  54. What is CLR?
  55. Difference between var and dynamic?
  56. Explain scenarios for async, await?
  57. Lazy loading?
  58. Can we inherit static class?
  59. What if we don’t use sealed, can we restrict the multiple object creation by just using private constructor?
  60. Generics  and Non Generics?
  61. Approaches in EFW?
  62. What is DB context?
  63. Transaction management?
  64. How to create custom method for string?
  65. Scenarios of singleton class?
  66. Thread life cycle?
  67. Difference between arraylist and array?
  68. Boxing and Unboxing?
  69. What is override?
  70. Difference between Virtual, Override and new ?
  71. Does csharp support multiple Inheritence?
  72. Does over loading has different return types?
  73. Difference between Idispose and Ifinalise?
  74. What is exception?
  75. Explain the concept of async/await in C#. How does it work under the hood?
  76. What are some common pitfalls to avoid when using async/await in C#?
  77. How can I handle exceptions in async methods effectively?
  78. What are the performance implications of using async/await in C#?
  79. What is the difference between IEnumerable<T> and IQueryable<T>?
  80. What are extension methods and how are they used?
  81. Explain the difference between Task and ValueTask. When would you use one over the other?
  82. What is the difference between an abstract class and an interface?
  83. Explain the concept of polymorphism in C#. Provide an example.
  84. What are the different types of inheritance in C#?
  85. How does C# support encapsulation?
  86. What is the difference between method overloading and method overriding?
  87. Can you explain the Singleton pattern and how to implement it in C#?
  88. What is the Repository pattern and why is it useful?
  89. Explain the Dependency Injection pattern. How is it implemented in C#?
  90. What is the Factory pattern? Provide an example of its usage.
  91. Describe the Observer pattern and provide a C# example.
  92. What are some best practices for exception handling in C#?
  93. How do you ensure thread safety in a multi-threaded C# application?
  94. What are some common performance optimization techniques in C#?
  95. How do you manage memory in C#? Explain the concept of garbage collection.
  96. What are some best practices for writing unit tests in C#?
  97. What is reflection in C# and how is it used?
  98. Explain the concept of delegates and events in C#. Provide an example.
  99. What are generics in C# and why are they useful?
  100. What is LINQ and how does it work? Provide an example of a LINQ query.
  101. Explain the concept of dependency properties in WPF.
  102. What is Entity Framework and how does it work?
  103. Explain the difference between Code First, Database First, and Model First approaches in Entity Framework.
  104. How do you handle migrations in Entity Framework Core?
  105. What are some performance considerations when using Entity Framework?
  106. How do you implement lazy loading and eager loading in Entity Framework?
  107. Write a method to reverse a string in C#.
  108. Implement a simple linked list in C#.
  109. Write a method to find the nth Fibonacci number using recursion and iteration.
  110. Implement a basic CRUD operation using Entity Framework Core.
  111. Write a method to check if a given string is a palindrome.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *