Object Oriented Programming
Object Oriented Programming
4) What is the relationship between a class and an object? 5) Explain the basic features of OOPs. 6) What is the difference between arrays and collection? 7) How can you prevent your class to be inherited further? 8) What is the index value of the first element in an array? 9) Explain different types of inheritance. 10) Can you specify the accessibility modifier for methods inside the interface? 11) Is it possible for a class to inherit the constructor of its base class? 12) How is method overriding different from method overloading? 13) What is the difference between a class and a structure? 14) Differentiate between the while and for loop in C#. 15) Why is the virtual keyword used in code? 16) Can you allow a class to be inherited, but prevent a method from being overridden in C#? 17) Define enumeration? 18) Explain the concept of constructor? 19) Can you inherit private members of a class? 20) Can you inherit private members of a class? 21) What is the syntax to inherit from a class in C#? 22) Do events have return type? 23) What is the function of the Try-Catch-Finally block? 24) How can you prevent a class from overriding in C# ? 25) What are abstract classes? What are the distinct characteristics of an abstract class? 26) Is it possible to execute two catch blocks? 27) Explain the concept of destructor? 28) What is a static constructor? 29) What are the different ways a method can be overloaded? 30) What does a break statement do in the switch statement?