Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# web service consumption code to VB
Message
 
To
06/03/2008 12:32:26
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01299356
Message ID:
01299360
Views:
6
>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 arguments 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?
>
>pamela


Better ask thin in NET forum :-)
I am sure you will get more reliable answers there.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform