I have a python script:
def f():
a = None
b = None
return (a, b)
a, b = f()
It's so easy to achieve multiple return values in python. And now I want to achieve the same result in C#. I tried several ways, like return int[] or KeyValuePair. But both ways looked not elegant. I wonder a exciting solution. thanks a lot.
let f() = (14, 29)thenlet (a, b) = f()TryParsemuch more concisely than C#, because it returns out parameters as part of a tuple:let (success, result) = Int32.TryParse(someString)