C# Convert Object to list<string> -
i trying store dates first row list string. how convert them list string object?
public list<string> populatedates(string id) { list<string> dates = new list<string>(); (int = 1; < table.columns.count; i++) { object o = table.rows[1][i]; console.writeline(o); } return dates; }
you need add items list. can call tostring
convert item string. example:
public list<string> populatedates(string id) { list<string> dates = new list<string>(); (int = 1; < table.columns.count; i++) { dates.add(table.rows[1][i].tostring()); } return dates; }
Comments
Post a Comment