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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -