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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -