c# function with multiple outputs code example
Example 1: c# return two variables of different types
(string, string, int) LookupName(long id) // tuple return type
{
... // retrieve first, middle and myNum from data storage
return (first, middle, myNum); // tuple literal
}
Example 2: c# method returns multiple values
public Tuple<int, int> GetMultipleValue()
{
return Tuple.Create(1,2);
}