Answers for "c# class is inherit the multiple"

C#
1

c# multiple inheritance

public interface IFirst { void FirstMethod(); }
public interface ISecond { void SecondMethod(); }

public class First:IFirst 
{ 
    public void FirstMethod() { Console.WriteLine("First"); } 
}

public class Second:ISecond 
{ 
    public void SecondMethod() { Console.WriteLine("Second"); } 
}

public class FirstAndSecond: IFirst, ISecond
{
    First first = new First();
    Second second = new Second();
    public void FirstMethod() { first.FirstMethod(); }
    public void SecondMethod() { second.SecondMethod(); }
}
Posted by: Guest on October-26-2020

Code answers related to "c# class is inherit the multiple"

C# Answers by Framework

Browse Popular Code Answers by Language