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 private class in c#?
What is the difference between interface and inheritance in c#?
Can private virtual methods be overridden in c#.net?
Can you describe iuknown interface in short?
What Is The Smallest Unit Of Execution In .net?
Can we extend sealed class in c#?
What is difference between yielding and sleeping?
What is an example of a delegate?
What are object pooling and connection pooling and difference between them?
What do you mean by expression tree?
What is windows application in c#?
What are namespaces, and how they are used?
Write down the c# syntax to catch an exception
What is attribute c#?
How can you read 3rd line from a text file?