Process Single request and send multiple responses

carlin

New member
Joined
May 10, 2016
Messages
2
Programming Experience
3-5
I am getting two variables to a c# method as a single request. I have to process two variables in parallel as a separate thread and send two responses as an object to a method for each thread. Any idea is greatly appreciated. Thanks in Advance.
 
I'm not quite sure what you're asking for. Is it the getting the results produced by two threads that is your issue or is it returning two values? If it's the latter then you can't actually return more than one object but that object can be as complex as you like. That means that it could be an array with your two values as elements, a Tuple with your two values assigned to properties or whatever else is appropriate. The alternative to that would be to use 'ref' or 'out' parameters for one or both of the outputs rather than the one and only return value.
 
Back
Top Bottom