Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting a piece of code
Message
From
11/09/2012 07:33:59
 
 
To
10/09/2012 08:42:00
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01552643
Message ID:
01552697
Views:
40
>I cannot find a converter able to convert this piece of code:
>
>
>var endpoint = new EndpointAddress(new Uri(RemoteAddress), 
>                                               new[] 
>                                                   { 
>                                                       AddressHeader.CreateAddressHeader("APIKey", "", 
>                                                                                         "bda11d91-7ade-4da1-855d-24adfe39d174") 
>                                                   }); 
>
>
>Anyone would know how to make it into VB.NET?

I assume that it is the use of the C# implicitly typed array which is giving the problem. Maybe provide concrete type as the second parameter:
New AddressHeader() {AddressHeader.CreateAddressHeader("APIKey", "", "bda11d91-7ade-4da1-855d-24adfe39d174")}

Or maybe OPTION STRICT OFF might allow it to work as is (just a guess)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform