Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern alias CL1;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- using ClassLibrary2;
- using TestName = CL1.ClassLibrary1.Class1;
- using static System.Console;
- namespace Interface
- {
- class Program
- {
- public interface IsomeinterfaceA
- {
- void SomeMethod();
- }
- public interface IsomeinterfaceB
- {
- void SomeMethod();
- }
- public class MyClass : IsomeinterfaceA, IsomeinterfaceB
- {
- void IsomeinterfaceA.SomeMethod()
- {
- WriteLine("Some Method");
- }
- void IsomeinterfaceB.SomeMethod()
- {
- WriteLine("Some Method B");
- }
- }
- static void Main(string[] args)
- {
- MyClass myClass = new MyClass();
- IsomeinterfaceA ref1 = myClass;
- IsomeinterfaceB ref2 = myClass;
- ref1.SomeMethod();
- ref2.SomeMethod();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement