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 a constructor? What is a destructor?

774


Why is dll used?

788


Which language is used for desktop application?

726


What is using keyword?

716


Why delegate is used in c#?

704


Is c# pass by value?

701


What is difference between method overriding and method overloading?

770


What is the C# syntax to catch any possible exception?

757


What is the advantage of singleton class?

727


If a child class instance is created, which class constructor is called first - base class or child class?

732


What is lock statement in C#?

771


What does f mean in c#?

712


What is difference between c sharp and c#?

694


Can we have multiple threads in one app domain?

750


Can abstract class have constructor?

699