Interface with method name conflicts : Interface : Class Interface C# Source Code


Custom Search

C# Source Code » Class Interface » Interface »

 

Interface with method name conflicts








    
 
using System;

public delegate void AlarmEvent(IAlarm sender);

public interface IAlarm {
    event AlarmEvent IssueAlarm;
}

abstract class MyStuff : ICloneable {
    public object Clone() {
        return null;
    }
    public void DoStuff() {
    }

}
interface IFoo {
    void DoStuff();
}

interface IBar {
    void DoStuff();
}

interface ITest {
    void DoSomething();
    int DoSomethingElse();
}
class MyClass : IFoo, IBar {
    void IFoo.DoStuff() {
    }
    void IBar.DoStuff() {
    }
}

class MainClass : IComparable {
    public int CompareTo(object other) {
        return -1;
    }
    static int Main(string[] args) {
        MainClass c = new MainClass();
        MainClass c2 = new MainClass();
        if (c.CompareTo(c2) == 0)
            return 0;
        MyClass c3 = new MyClass();
        return 1;
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Class Interface
» Interface