//循环遍历DataTable
foreach (DataRow row in dt[0].Rows)
{
string strValues = "";
long lMaxValue = 0;
long lMinValue = 100;
for (int i = 1; i < dt[0].Columns.Count; i++)
{
//取得最大值和最小值
long lValue = long.Parse(row[i].ToString());
if (lValue > lMaxValue)
{
lMaxValue = lValue;
在这里想算个百分比lMaxValue
}
}因为循环的最大值会分别传入到各个界面的参数中,现在有种情况是循环出来的最大值有一定的差距,想用个百分比进行数据的折中,有什么办法?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货