Why interface is used?
Answer / Shweta Verma
Interfaces are used in C# for several reasons, including promoting loose coupling between classes by defining a contract that the implementing classes must adhere to; providing a way to achieve polymorphism and multiple inheritance (a class can implement multiple interfaces); organizing code by dividing the implementation details from the interface; and enabling programmers to work with abstractions rather than concrete classes.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which is the parameter that is added to every non-static member function when it is called?
What causes polymorphism?
write a program to find 2^n+1 ?
What is the difference between and interface and an abstract class ?
4 Answers IBM, Infosys, Ness Technologies,
What are virtual classes?
What is polymorphism oop?
What is the main difference between C++ and Java
what is overloading
ambiguity regulation of multiple inheritance with example.
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
difference between class and object
10 Answers Chandan, IBM, Magic Soft,
What is the difference between an object and a class?