public interface IMyInterface
{
List<string> MyList(string s)
}
public class MyClass : IMyInterface
{
public List<string> MyList(string s)
}
What is the difference between:
[Method]
MyClass inst = new MyClass();
...
Or:
[Method]
var inst = new MyClass() as IMyInterface;
...
Or:
[Method]
IMyInterface inst = new MyClass();
...
What is the proper way to use an implementation of IMyInterface?