When I was debugging the data returned from a Stored Proc, I drilled into the DataRow to see what values were assigned the various members of the data set. This took me down a rabbit hole on a wild goose chase, going from "Static Members" to "Value" and back again, over and over, as can be seen here:
Why does it do this?
I had a breakpoint set on the assignment to custNum in this block:
foreach (DataRow delPerfDataRow in dtDelPerf.Rows)
{
string custNum = delPerfDataRow["CustNo"].ToString();
string memNum = delPerfDataRow["MemberNo"].ToString();
. . .
Both custNum and memNum were not showing any values after the assignment statements, so I right-clicked delPerfDataRow to see which values the other data members had. When it came to digging into the CustNo data member, though, attempting to see the value led to this redundant, recurringly teasing tail-chasing.
Because you keep looking at the same thing over and over. Look at the image below:
The value of s
is System.DBNull
which has a field named Value
. That field is of type System.DBNull
which obviously will have a field named Value
. And on and on it goes.
The same thing is happening in your case. Your CustNo
column has System.DBNull
so on and on it goes. If you view it in the quick watch window, you will see the same window as the image above.