Tuple may be a useful construct for this.
public Tuple<int, string, double> Foo() { ... }
Then you can do:
var result = Foo(); int a = result.Item1; string b = result.Item2; double c = result.Item3;
This is a legacy of the increasing influence of functional programming styles in C #: a tuple is a fundamental construct in many functional languages ββand greatly helps in their static typing.
Rob lyndon
source share