I'm new to OOP and C#. I have a strong Python background and I was wondering is there an equivalent in C# for this
#Python
def outputSmth():
num1 = 3
num2 = 3
str1 = "Hi"
return (num1, num2, str1) #Returning a tuple that can later be accessed
# by index
If there is no direct equivalent, which I doubt there is, what is the most proper way to do it?
Here's my function :
//C#
static tuple PrintUserCreationMnu()
{
Console.Clear();
Console.WriteLine("---- Create the user ----\n");
Console.Write("User ID : "); string usrID = Console.ReadLine();
Console.Write("First Name : "); string f_Name = Console.ReadLine();
Console.Write("Last Name : "); string l_Name = Console.ReadLine();
Console.Write("Expected leaving date : "); string l_Date = Console.ReadLine();
return ; //Here I'd like to return all my inputted values
}
Thank you!