sql - Remove the only single column from datatable and insert it into a generic list of strings c# -


here method

    public virtual list<string> getjobname(nullable<int> id, nullable<int> userid)     {         list<sqlparameter> parameters = new list<sqlparameter>();          var idparameter = id.hasvalue ?             new sqlparameter("id", id) :             new sqlparameter("id", typeof(int));         parameters.add(idparameter);          var useridparameter = userid.hasvalue ?             new sqlparameter("userid", userid) :             new sqlparameter("userid", typeof(int));         parameters.add(useridparameter);           table = executespdatatable("getjobname", parameters, out list);       //  datafiller<string> j = new datafiller<string>();       //  list<string> rows = j.fromdatatabletolist(table);      }  

table holds 1 value, single job , want put single string list<string> , return.

any help?

if variable table string, , want return string list of string, have this:

return new list<string>{ table }; 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -