Answer Posted / dipal mehta
The above one is a right answer but the reader who reads it
for referance plz Note line :
I1 i1=new sample();
i1.add();
This might confusing but It means that We have created
object of I1 interface class but with sample as a assigned
object which is valic in this case.
Now call of i1.add() will call the method of interface I1
which points to or defined in Sample class
This will more clearer if you will append two or three more
simple methods like subtract() and try to call it as above
one which actually a part of Mostly used Multiple
Inheritance funda.
personally speaking it will benefitial to you if try
yourself
Hope readers like tips
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is the purpose of IClonable interface in .NET?
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
The project which you have made, which methodology did you use?
What is implement a generic action in webapi?
How can I tell if .net 3.5 is installed?
What is il and c#?
What is a manifest in .net?
What do the terms “boxing” and “unboxing” mean?
What is file extension of Webservices in .Net?
what are connection strings?
What is the difference between an abstract class and an interface?
What do you mean by Driver Script?
Explain memory-mapped files.
What does cli do?
What are the new features in .net core?