Have a class that is derived from System.Windows.Forms.UserControl and implements an interface IFoo. After having a SomeControl instance created with a Height specified and having that assigned to a local IFoo variable display, an attempt to assign a value to display's Height property via it's public setter isn't working for me.
I'm observing this while stepping through the debugger so I've trumped up this test case to simplify thing. I realize "select isn't broken" so there is a gap in my knowledge here of why I can't set this property so I'd like to understand what that is. Thanks.
public interface IFoo
{
int Height {get;set;} // which is implemented by UserControl
}
public class SomeControl : UserControl, IFoo { /*impl goes here*/ }
[TestFixture]
public class TestFixture
{
[Test]
public void Test()
{
IFoo display = ...
// assume that display is of type SomeControl
// and already has a value for Height at 123
Assert.IsTrue(display.Height == 123);
display.Height = 789;
Assert.IsTrue(display.Height == 789); //FAILS
}
}