M
M
martin_eden_msk2021-09-08 21:13:41
C++ / C#
martin_eden_msk, 2021-09-08 21:13:41

How to pass a List to c#?

Hello. Help find a solution.
the web service has a WSDL. I added a link to it in the c# application.
there in SOAP you need to pass parameters to the function

createD (String token,  List<mapEntryStringString> attribureValues)

there are no questions with the first parameter, but with a List<mapEntryStringString>problem.
in c# there is no map, but there are dictionaries. but if I make attribureValues ​​a dictionary (key-value), then an error occurs:
it is impossible to convert the dictionary type to the mapEntryStringString type.
is there a solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-09-09
@vabka

in c# there is no map, but there are dictionaries. but if I make attribureValues ​​a dictionary (key-value), then an error occurs:
it is impossible to convert the dictionary type to the mapEntryStringString type.

And where did you get the idea that you need to shove Dictionary there if mapEntryStringString is written there?
Just write new mapEntryStringString() and shove all the parameters you need there.
Most likely, there is just a list of key-value pairs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question