private DataColumn GetTextOnlyColumn(DataRow row)
{
#if DEBUG
{
// Make sure there is at most only one text column, and the text column (if present) is the one reported by row.Table.XmlText
DataColumnCollection columns = row.Table.Columns;
int cCols = columns.Count;
int cTextCols = 0;
for (int iCol = 0; iCol < cCols; iCol++)
{
DataColumn c = columns[iCol];
if (IsTextOnly(c))
{
Debug.Assert(c == row.Table.XmlText);
++cTextCols;
}
}
Debug.Assert(cTextCols == 0 || cTextCols == 1);
if (cTextCols == 0)
Debug.Assert(row.Table.XmlText == null);
}
#endif
return row.Table.XmlText;
}