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 -

php - Symfony 2: "No route found for "GET /" - error on fresh installation -

java - Openshift port-forwarding -