1

I am trying to consume a Web service for which WSDL has been provided. I have added the reference service and am using the generated proxy classes / client.

The client has a method called getUpdate which requires a getRequest parameter.

The getRequest class has string UserName, string WSName and @params[] @params properties.

I've learned that the @ allows C# to use a reserved word as a property name, but I am not familiar with how to assign to the @params property.

See code:

using (var svc = new ServiceClient())
{
    getRequest request = new getRequest();
    request.UserName = "someuser"; 
    request.WSName = "somename";
    request.@params = //what do I do here?

    var result = svc.getUpdate(request);
}

The @params property is of type @params[] and anything I try to assign gets flagged as

cannot implicity convert to params[]

How do I assign my parameters?

Quality Catalyst
  • 6,531
  • 8
  • 38
  • 62
Brad
  • 323
  • 2
  • 13
  • 1
    Is there also a generated class called `@params`? – GSerg Jun 26 '17 at 19:18
  • Ah, I see it. See, I knew it was a stupid question. params is defined and I just didn't see it in object browser. Thank you for calling my attention to where it needed to be. – Brad Jun 26 '17 at 19:22
  • Usually IntelliSence will tell you what to create if you type `request.@params = new `. – GSerg Jun 26 '17 at 19:41

0 Answers0