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


Please Help Members By Posting Answers For Below Questions

What is private class in c#?

482


What is the difference between interface and inheritance in c#?

471


Can private virtual methods be overridden in c#.net?

527


Can you describe iuknown interface in short?

617


What Is The Smallest Unit Of Execution In .net?

526






Can we extend sealed class in c#?

488


What is difference between yielding and sleeping?

452


What is an example of a delegate?

508


What are object pooling and connection pooling and difference between them?

515


What do you mean by expression tree?

448


What is windows application in c#?

474


What are namespaces, and how they are used?

569


Write down the c# syntax to catch an exception

525


What is attribute c#?

432


How can you read 3rd line from a text file?

529