Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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(); }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# guid from string 
Csharp :: cursor position c# 
Csharp :: c# max sequence contains no elements 
Csharp :: Get logged in user in ASP.Net 
Csharp :: how to set the current user httpcontext.current.user asp.net -mvc 
Csharp :: encode pdf file to base64 c# 
Csharp :: How to create a new object instance from a Type 
Csharp :: use c#9 
Csharp :: c# response.contenttype set filename 
Csharp :: generate random light colors programatically in android 
Csharp :: unity script template folder 
Csharp :: c# check that value is not null or 0 
Csharp :: commit help 
Csharp :: unity how to check serialized enum 
Csharp :: remove all values from list c# 
Csharp :: C# Async Function without await 
Csharp :: open project in visual studio using command prompt 
Csharp :: c# getting response content from post 
Csharp :: reference to gameobject in different scene unity 
Csharp :: How to invoke an AWS Lambda function asynchronously 
Csharp :: or operator in c# 
Csharp :: dateTime first/last 
Csharp :: c sharp type in word and calculate how much a letter is inside that word 
Csharp :: for loop c# to print times tables 
Csharp :: wpf fixed window size 
Csharp :: c# nunit assert.contains 
Csharp :: how to change argument of function in f# 
Csharp :: if exist request c# 
Csharp :: C# dest 
Csharp :: how to edit a c# list 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =