House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / .NET Technical Talk (Net-Talk)

Newbie question

Author:
G
07/07/2008 11:35 AM

Hi guys, I have an amateurish question here that I'm frustrated I don't know the answer too. Let me spell it out. I have a class that is exposed as a webservice as such: [Webservice (Namespace = "http://myurl.com <http://myurl.com/>; ")] public class MyClass {             Public struct dataStruct             {                         Public string dataName;                         Public string dataValue;             }             Public List<dataStruct> myMethod(List<dataStruct> inputDataStruc)             {                         //code                         //code             } } The webmethod has a member that is a simple structure (dataStruct). It contains a method (myMethod) that accepts a generic List of dataStructs. When I consume this method, and attempt to make use of the myMethod, I will need to pass in a parameter of type List<dataStruct>, and it is here that I am stuck. In the calling class, how do I instantiate a variable of type List<dataStruct> so that I can pass it into the method? I think I need to create an object in the MyClass of type List<dataStruct> and instantiate it in the Constructor, so that when I create a MyClass object, I will have access to the dataStruct type, but that didn't seem to work (possibly because I was doing I wrong). Thanks in advance for anyone who can both follow this, and help me out!!! :-) Brian


Search net-talk

February 11, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29