Answer Posted / jagan
hai friends,
we can achieve this multiple inheritence through
interfaces..
ex:interface I1
{
void add();
}
interface I2
{
void add();
}
class sample:I1,I2
{
I1.add()
{
console.write("this is add method");
}
I2.add()
{
console.write("this is del method");
}
}
//main()
{
I1 i1=new sample();
i1.add();
I2 i2=new sample();
i2.add();
}
}
here we can achieve multiple inheritence and we can avoid
the naming conficts..hope it will be usefull ........
| Is This Answer Correct ? | 24 Yes | 1 No |
Post New Answer View All Answers
What is the difference between boxing and unboxing?
Can any object be stored in a viewstate in .net?
Explain about the Common Language Runtime?
Define code access security (cas)?
What is the purpose of enumerable class in .net?
What is .net assembly?
Is .net core stable?
Explain me difference between public and static modifiers?
How can I tell if .net 3.5 is installed?
Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?
Describe difference between inline and code-behind?
What exactly is being serialized when you perform serialization in .net?
What’s different between process and application in .net?
How can I get at the win32 api from a .net program?
Please explain what is the difference between a class and an object?