c# - Adding List Array item In A Data Table Using Loop Results Error .. -


i trying put list array(res) item in data table(_hdt) using loop have put values in "res" list erray using loop...but loop results in error: "variable use asd method ?"

here _hdt , dt data table , res list array,

for (int r = 0; r < _hdt.rows.count; r++) {     foreach (datarow row in dt.select("date='" + _hdt.rows[r]["date"].tostring().trim() + "'"))     {         datetime date = convert.todatetime(_hdt.rows[r]["date"].tostring().trim());         string dateformat = string.format("{0:dddd mmm d}", date);         _hdt.rows[r]["date"] = dateformat;         _hdt.rows[r]["mtu"] = row["mtu"].tostring().trim();         _hdt.rows[r]["power"] = (convert.todecimal(row["power"].tostring().trim()) /                                   1000).tostring();        _hdt.rows[r]["cost"] = row["cost"].tostring().trim();        _hdt.rows[r]["voltage"] = row["voltage"].tostring().trim();        _hdt.rows[r]["kw"] = res(r);     } } 

what res(r) on line _hdt.rows[r]["kw"] = res(r); ??

changes res(r) res[r]


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -