c# - DataServiceCollection to a String -


i have dataservicecollection , want pull out info , put string.

    private dataservicecollection<p.groups> groups;     public dataservicecollection<p.groups> groups()     {         if (groups == null)         {             uri proot = new uri("http://localhost:19297/wcfdataservice1.svc/");             p.entities data = new p.entities(proot);              var query = (dataservicequery<p.groups>)data.groupsset;             groups = new dataservicecollection<p.groups>();             groups.loadasync(query);           }         return groups;     }       protected override void loadstate(object navigationparameter, dictionary<string, object> pagestate)     {           var g = groups();         this.defaultviewmodel["groups"] = g;     } 

i can bind xaml page no problem, want put "g" string.

may using linq,

g.items.aggregate((i, j) => + delimeter + j) 

from post: concat strings inside list<string> using linq


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -