C# Returning multiple values
I've the following code and it seems to work but how do I make it so that when the recursive is finished, it return more than one variable? Right now it's only return one value, how do I change the sub below to return more than one value like an integer and a string. Thanks in advance.
using System;
class Program
{
static int Recursive(int value, ref int count)
{
count++;
if (value >= 10)
{
// throw new Exception("End");
return value;
}
return Recursive(value + 1, ref count);
}
static void Main()
{
int count = 0;
int total = Recursive(5, ref count);
Console.WriteLine(total);
Console.WriteLine(count);
}
}