As shown below I have a method in my class that returns null as expected when it does not successfully read a value. I assume that the object "test" would just be set to NULL but for some reason an error is getting thrown.
I don't understand why this would throw an error...
private string myNullFunction() { return null; }
private void myFunction()
{
object test = myNullFunction();
}
when this does not...
private void myFunction()
{
object test = null;
}