namespace MyApp
{
class Program
{
static int check(int id, int age)
{
return id,age; // adding age gives error
}
public static void Main(string[] args)
{
check(3064,24);
}
}
}
By using tuples:
static (int, int) check(int id, int age)
{
return (id,age);
}
You can also name the values in your tuple:
static (int id, int age) check(int id, int age)
{
return (id,age);
}