Does anyone know how to pass a List<t> to a WCF Service

I have a WCF service that accepts a List<participants> as a parameter and I need to call it from the client ie javascript.  Can this be compeleted?

I'm looking to do something like.
var svc = new EMService();
                var valParti = $('#ddlParticipant').val();
                var list = new List<Participant>();
                var part = new Participant();
                list.Add(part);
                svc.SendMessageAll(list, onSuccess, null, null);
zekuczynskiAsked:
Who is Participating?
 
dxdinhConnect With a Mentor Commented:
Can you try to convert your List<P...> collections to Participant [] using ToArray method?
0
 
keustermansCommented:
Hi there,

As far as I know you are notable to pass generic objects through wcf.

0
 
zekuczynskiAuthor Commented:
Is there another approach I can take?  Can I pass a collection or list of objects?
0
 
zekuczynskiAuthor Commented:
That worked.  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.