-1

This is not a duplicate question, I checked all the available questions on the same subject.

I'm trying to consume a service which is WSDL.

Now I want to return the list of particular field from the response and below is what I tried:

What is the best way to return a list of 'PreferredFullName' from the response?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sandy
  • 2,429
  • 7
  • 33
  • 63
  • 1
    Is response type an IEnumerable or something like that or is it just an object ( not a collection )? – mrogal.ski Sep 15 '17 at 12:35
  • @m.rogalski Its just an object – Sandy Sep 15 '17 at 12:44
  • So why do you use Linq? Just use `var q = new PersonDetailsBO { PrefferedFullName = t1.PrefferedFullName };` – mrogal.ski Sep 15 '17 at 12:51
  • @@m.rogalski I need to return list of PreffredFullName – Sandy Sep 15 '17 at 13:05
  • 1
    Two things: 1. paste code as text , not as an image. 2. You REALLY should remove these private data from your question. In fact, I did the last thing for you. – Gert Arnold Sep 15 '17 at 20:37
  • Good job @Cody! – Gert Arnold Sep 16 '17 at 09:29
  • *This is not a duplicate question, I checked all the available questions on the same subject.* - then please **show what you tried** that did not work. In order to help you, we need to see a [mcve] -- some code we can review and, ideally, debug, As it is, with only a bitmap image of an error, all we can do is run Google and find: [Could not find an implementation of the query pattern](https://stackoverflow.com/q/8215773). See also [Why not upload images of code on SO when asking a question?](https://meta.stackoverflow.com/a/285557). – dbc Sep 17 '17 at 20:18

1 Answers1

0

Sorry for putting code as image. Anyways, I could figure out the solution by response.responsenote.Select()

Sandy
  • 2,429
  • 7
  • 33
  • 63