Consider this bit of code:
class X
{
int _value;
public object Value { get { return _value; } set { _value = Convert.ToInt32(value); } }
}
X x = new X();
object y = x.Value = 2.3;
To me it looks like y == 2.0 because that is the return value of x.Value, but it turns out that it is y == 2.3, even though x.Value == 2.
Why?