Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# web service consumption code to VB
Message
From
06/03/2008 15:03:06
 
 
To
06/03/2008 12:32:26
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01299356
Message ID:
01299480
Views:
9
>I am creating a local wrapper to a remote web service. All I have for instruction is C# code and I am having a dickens of a time trying to create something in VB that it doesn't choke on.
>
>I instantiate a Subscriber object that has an Attributes property. The Attributes property is an array or a collection (I am not sure) of Attribute objects each have Name and Value string properties. The C# code is:
>
>etsub.Attributes = new Attribute[1];
>etsub.Attributes[0] = new Attribute();
>
>
>If I try the first line as written in VB, I get the error "Value of type Attribute cannot be converted to one-dimensional array of type attribute." If I replace the square brackets with parentheses I get the error "Two many arguements for Public Sub New()" So I tried:
>
>Dim SubArray(2) As Attribute
>etSub.Attributes = SubArray
>
>But when I go to address an element of the array I get the properties of the subscription object not the properties of the Attribute object.
>
>Any ideas to get me past this sticking point?

I don't think that the C# code itself makes much sense. What is etsub?
Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform