C#.Net interview questions and Answers
1) Basic OOP Concepts (OOP, Object, Class)a) What is OOP ?
b) What is Object ?
c) What is Class ?
2) What are properties of object oriented programming ? Or
What are 4 main Pillars / Components /Concepts of object oriented programming ?
a) What is Abstraction?
b) What is encapsulation? Abstraction Vs Encapsulation ?
c) What is Polymorphism? Types of Polymorphism ? Static Vs Dynamic Polymorphism ?
Static Polymorphism ( Funcation Overloading.)
Dynamic Polymorphism ( Funcation Overriding.)
d) What is Inheritance? What are the types of Inheritance?
Implementation Inheritance
Interface Inheritance
3) Interview questions related to Inheritance in C#.Net
a) What is Inheritance Hierarchy?
b) Do .Net supports multiple inheritance?
c) Why don’t we have multiple inheritance in .Net?
d) How do you prevent a class from inherited?
e) If we inherit the class does the private variables also inherited?
4) Interview questions related to Abstract class and interface
e) Advantage of Interface over abstract class ?
=> A class can inherit multiple interfaces but can inherit only one class.
f) When to use abstract class and interface ?
g) What are Abstract properties ?
h) What is Explicit and default interface ?
i) Do Interface have accessibility modifier ? Ans: Yes
j) Do Interface members have accessibility modifier ? Ans: No
j) Do Interface members have accessibility modifier ? Ans: No
k) Examples on Interface.
when you replace all the .NET references, this could be used for Java as well. These questions are too general for a .NET specific interview. You should always base your questions on the specific job opportunity you have to offer.
ReplyDelete@Anon: I agree with you. These are the most common questions and no matter of launguage .Net or Java. Its OOP basic questions.
Delete