Duplicate:
Is it possible to make a parameter implement two interfaces?
Looking for a way to do this :
public interface INumber1 {}
public interface INumber2 {}
public class TestObject : INumber1, INumber2 {}
public static class TestClass
{
public static void TestMethod(INumber1&INumber2 testobject)
{
...
}
}
Calling the TestMethod :
TestClass.TestMethod(new TestObject());
The thing is that I need a parameter to contain methods from both INumber1 and INumber2. Tips?