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.mylistis empty.

c# wcf

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -