ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,jQuery Plugins,jQuery UI,SSRS,XML,HTML,jQuery demos,code snippet examples.

Breaking News

  1. Home
  2. C #
  3. OOPs
  4. OOPS INTERVIEW QUESTIONS: C#

OOPS INTERVIEW QUESTIONS: C#

  1. What is .Net framework? Different Versions of .Net framework?
  2. What is latest .Net framework and Vs available?
  3. What is OOPS? 
  4. Important OOPS concepts?
  5. What is Class and how to declare the class?
  6. What is object and how to declare the Object?
  7. What is Access modifier in .Net, Public, Private, Internal, Protected Internal. 
  8. What are naming convention for class in .net?
  9. Can we create class name with numbers?
  10. Can we use special character to create the class?
  11. By default class follows which access modifier?
  12. Types of Access specifier/modifiers?
  13. Can we declare class as private/protected/protected /internal? 
  14. By default class members are, means access modifier?
  15. Diff bw Public, private and Internal access modifier?
  16. Difference between protected and protected internal?
  17. Default access modifier for class members/variables are
  18. Is it necessary to have Main method in console application?
  19. If yes then there will be compile time or runtime error?
  20. What is entry point in console application?
  21. Is it necessary to have parameter in Main method?
  22. Can we have  Main method in some other class?
  23. What is inheritance?
  24. What is base/parent and child/derived class.
  25. How to reuse inherited members in child class?
  26. Does c# supports multiple inheritance?
  27. How to achieve multiple inheritance?
  28. Why c# does not support multiple inheritance?
  29. Is circular inheritance possible ? A:B, and B:A
  30. How do you prevent a class from being inherited ?
  31. What is Sealed keyword?
  32. Can we create the object of Sealed class?
  33. Can derive class have public modifier when there are no modifiers specified on the base class?
  34. Can we mark methods as Sealed? 
  35. what do you mean by upcasting and downcasting ?
  36. What is interface?
  37. By default interface is?
  38. Can we have access modifier in interface?
  39. Can we have variables in interface?
  40. Can we create instance of interface? 
  41. Can we create constructor in interface?
  42. Can we declare properties in interface?
  43. Can interface inherit another interface?
  44. Can interface inherit class?
  45. How to achieve multiple inheritance through interface?
  46. If 2 interface has same method then how to implement the method?
  47. What is implicit implementation and when to use in interface?
  48. What is explicit implementation and when to use?
  49. Is it compulsory to implement all methods of interface?
  50. How to call interface implemented methods?
  51. How to call explicit implemented methods of interface?
  52. What is Constructor? Use of constructor?
  53. Different types of constructor?
  54. What is Default constructor?
  55. What is parameterized constructor? 
  56. Use of parameterized constructor? 
  57. What is constructor overloading?
  58. Is it mandatory to have default and parameterized constructor in class?
  59. If we have only parameterized constructor, can we create the object of class?
  60. What is copy constructor?
  61. Purpose of copy constructor?
  62. What is private constructor? 
  63. Use/purpose of private constructor?
  64. Can we have default and private constructor both in class? 
  65. Can we create the object of class if we have only private constructor in class?
  66. Can we inherit the class if we have only private constructor in class?
  67. Can we have parameters in private constructor?
  68. What is static constructor?
  69. Can we have access modifier in static constructor?
  70. Can we pass parameters in static constructor?
  71. How to call static constructor or when static constructor is called?
  72. How many times we can call static constructor?
  73. When we create instance of class, which constructor is called first?
  74. Use/Purpose of static constructor?
  75. Can we have static constructor only?
  76. How can we call one constructor from another in the same class ?
  77. When we create instance of child class which constructor is first called, child or Parent?
  78. How to call explicitly base class constructor  from child class?
  79. Can we call base class parameterized constructor from child class constructor?
  80. if we have only parameterized constructor in base class, can we create object of child class?
  81. Default access modifier/specifier for constructor ?
  82. What is destructor?
  83. Can we have access modifier in destructor?
  84. Can we have parameters in destructor?
  85. How many destructor we can have in one class? 
  86. Can we define destructor in struct data type?
  87. Do we have any control when destructor will be called?
  88. Do we always need to implement the destructor?
  89. When we define destructor, which method of garbage collector is called?
  90. What is polymorphism?
  91. Types of polymorphism?
  92. What is method overloading? Example of method Overloading?
  93. When we should use method overloading?
  94. What are different names used for method overloading?
  95. What is method overriding?
  96. How to achieve method overriding?
  97. Is it mandatory to implement virtual method of base class in child class?
  98. Can we override non-virtual method?
  99. Can we use the virtual modifier with the static, abstract, private or override modifiers. 
  100. Can we use virtual for internal, protected and protected internal?
  101. What are different names/terms used for overriding:
  102. If parent class virtual method and child have same method without override keyword, Will code be compiled? 
  103. In above case which error/warning will be shown? 
  104. What is “new” keyword in method overriding?: method hiding
  105. When to use “new” keyword in method overriding?
  106. What’s the difference between new and override keyword?
  107. Can we allow a class to be inherited but prevent method to be overridden? 
  108. What is Params keyword?
  109. How to achieve method overloading through Params?
  110. Order of params parameters?: it must be placed at last in method
  111. What is abstract class?
  112. What is the syntax of abstract class?
  113. What is the abstract method?
  114. Can we declare abstract method as private? : NO
  115. Can we create instance of abstract class? : No
  116. Can abstract class inherit another class? : Yes
  117. Can abstract class inherit interface? : Yes
  118. Can abstract class have constructor? : Yes
  119. Can we declare Abstract class as static?
  120. Can we declare Static methods in abstract class? 
  121. Difference between Abstract class and interface?(Most imp) 

No comments