Following code
A TestMethod ()
{
TestProp = null;
A testVariable = (A)TestProp;
return testVariable;
}
private A testProp;
public object TestProp
{
get {
return this.testProp;
}
set {
this.testProp = (A)value;
}
}
interface A
{
}
breaks at line
TestProp = null;
If commented out, then it breaks on
A testVariable = (A)TestProp;
In both cases it fails on
System.NullReferenceException : Object reference not set to an instance of an object
at Test.Program.set_TestProp (System.Object value) [0x00001] ...
This code is working in Visual Studio 2012 and was working in older versions of Xamarin.
Maybe there is some bug in latest Mono implementation? Do you experience similar problems?