c# - Show a list from a wcf library to a form -
c# - Show a list from a wcf library to a form -
i using form app selfhost wcf service. service works ok , objects it's receiving stored in list. have list within service , foreach
list , output in richtextbox
.
i made list enumerable because receiving error:
foreach statement cannot operate on variables of type not contain public definition 'getenumerator'
so code now:
//selfhosted_listener.service1 class public static list<composite> mylist = new list<composite>(); public ienumerator<composite> getenumerator() { homecoming mylist.getenumerator(); } ienumerator ienumerable.getenumerator() { homecoming mylist.getenumerator(); }
while debugging see list has data. that's great far press button initiate process of appending text using code:
//anamespace.form1.update() foreach (selfhosted_listener.compositelist compositeobj in selfhosted_listener.service1.mylist) { appendtext(compositeobj); }
i see selfhosted_listener.service1.mylist
is empty.
c# wcf
Comments
Post a Comment