Can you inherit multiple interfaces?
Answer Posted / vikas sv
Yes. Multiple interfaces may be inherited in C#.
Note that when a class and multiple interfaces are to be
inherited, then the class name should be written first,
followed by the names of the interfaces. See code example
below, on how to inherit multiple interfaces in C#.
C# Example
class someclass : parentclass, IInterface1, IInterface2
{
//...Some code in C#
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is a struct in C#?
What is the use of 0 in c#?
Can I call a virtual method from a constructor/destructor?
What do you mean by jagged array?
Can we inherit singleton class in c#?
what optimizations does the c# compiler perform when you use the /optimize+ compiler option?
What is the difference between values and reference types?
what is .NET framework architecture ??
What is the difference between a constant and a static readonly field?
How is method overriding different from overloading?
What is a statement c#?
Explain the difference between access specifier and access modifier in c#?
In how many ways you can overload a method?
What is difference between code access and role based security?
How can I produce an assembly?