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)
Comments
Post a Comment