I have two classes:
public class TestClass1
{
public int TestInt { get; set; }
public void TestMethod()
{
// Do something
}
}
public class TestClass2
{
public int TestInt { get; set; }
public void TestMethod()
{
// Do something
}
}
I want to create interface that I can use for both classes. The easiest solution is to implement the interface on TestClass1 and TestClass2 but I don;t have access to the implementation of these classes (external dll). I was wondering if I can create new interface and use AutoMapper to map TestClass1 and TestClass2 to ITestInterface:
public interface ITestInterface
{
int TestInt { get; set; }
void TestMethod();
}