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 virtual property. Give an example?
Which is faster abstract class or interface in c#?
Compare and contrast between the System.Array.CopyTo() and Clone()?
What is generic method in c#?
What is hashtable in c# with example?
Is multiple inheritance possible in c#?
If you define a user defined data type by using the struct keyword, is it a value type or reference type?
What is the difference between “out” and “ref” parameters in c#?
What is the difference between array and arraylist c#?
What is private constructor c#?
What is thread safe in c#?
What is difference between association, aggregation and inheritance relationships?
Explain About .NET Framework
What is executescalar in c#?
What is base class in c#?