How can i solve "0 " value try to get length value?
Posted
by Phsika
on Stack Overflow
See other posts from Stack Overflow
or by Phsika
Published on 2010-06-18T14:56:21Z
Indexed on
2010/06/18
15:13 UTC
Read the original article
Hit count: 153
if i try to add int value into array with string length Whole data is "0" why? and how can solve it?
for (int j = 0; j < dTable.Columns.Count; j++)
for (int i = 0; i < dTable.Rows.Count; i++)
{
mycounter[i] = dTable.Rows[i][j].ToString().Length;
}
it is not related to mycounter because:
string test = "";
foreach(DataColumn dc in dTable.Columns)
for (int i = 0; i < dTable.Rows.Count; i++)
{
// MessageBox.Show(dTable.Rows[i][dc].ToString());
test = dTable.Rows[i][dc].ToString().Length.ToString();
}
© Stack Overflow or respective owner