I usually send data back to the calling code using return. However this time I have to send two kinds of data:
public IEnumerable<AccountDetail> ShowDetails(string runTime)
Is it possible for me to send the value of runTime back to the calling code?
Yes, it's possible via either the ref
or out
keywords.
Usually, though, the need to do this points to a design failure elsewhere... not always, there are some good cases for this, but often enough that I'd want to spend a bit of time thinking about what I'm really doing first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With