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 are the types of assembly available
What is the difference between static class and singleton class in c#?
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
Is a dll an assembly?
Does hashset allow duplicates c#?
What is icomparer in c#?
Is learning c# hard?
Can you declare struct members as protected?
Can we have multiple constructors in a class c#?
What is append in c#?
How do you prevent a class from being inherited?
In which situation(s), the use of "Delegate" is a good idea?
What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?
what is partial assembly reference
What is an int c#?