Tuple solution

suggest change

You can return an instance of Tuple class from your function with two template parameters as Tuple<string, MyClass>:

public Tuple<string, MyClass> FunctionWith2ReturnValues ()
{
    return Tuple.Create("abc", new MyClass());
}

And read the values like below:

Console.WriteLine(x.Item1);
Console.WriteLine(x.Item2);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents