DotNet

Custom Collection Parameter in a Web Service

This post below will show you how to pass a custom collection as a parameter to the webservice. Create a custom collection class... public class Person { public int Age; public string FName, LName; public Person() { } public Person(string fname, string lname, int age) { Age = age; FName = fname; LName = lname; } } Create a Web Method... [WebMethod] public void Method(Person[] fields, bool attachmentincluded) { System.Collections.Generic.... people = new List<Person>(fields); ......