//dr的列名和值对应 Dictionary<string, object> drDic = new Dictionary<string, object>(); foreach (DataColumn item in dr.Table.Columns) { drDic.Add(item.ColumnName, dr[item.ColumnName]); } foreach (string key in drDic.Keys) { result += key + "=" + drDic[key].ToString() + "&"; }
时间: 2024-11-07 13:46:18