This infers the concrete type:
//X is of type X
var x = new X();
This does not
//X is of type IX
IX x = new X();
I'm guessing the warning will still occurt if you write
//X is of type X
X x = new X();
Also does the following remove the warning?
public void TestX()
{
//X is of type X
var x = new X();
UseIX(x);
}
public void UseIX(IX interfaceParam)
{
interfaceParam.Foo = 1;
}