C# interface vs class access


When a class implements an Interface, is it better to access the properties and methods through the class itself or through its Interface?

Best Solution

Interface, it will decouple the class so you can test it later. If you do not need to test it later, or there is no possibility of passing in a different class which inherits from the same interface then using the class methods is perfectly normal. Especially in the case of base classes like System.Collections.Generic.List. You wouldn't want to first cast it to IEnumerable every time you would like to do LINQ queries on it.