In C # 4.5, I am having a strange problem.
I have this in my model:
private DataMatrix<T> _matrix;
public DataMatrix<T> Matrix
{
get { return _matrix; }
set { _matrix = value; }
}
And I have a property that uses this:
public object SingleElement
{
get
{
if (Matrix == null) return String.Empty;
if (Matrix.ColumnCount >= 1 && Matrix.RowCount >= 1)
{
return Matrix[0, 0];
}
return null;
}
}
When I started it, before calling the SingleElementMatrix property is null. But it does not return String.Empty, it goes to the second if statement.
My Immediate window says:

I'm a little confused. What have I done wrong?
source
share