If I have something like:
static string characterName()
{
Console.Write("Name your character: ");
string name = Console.ReadLine();
Console.Write("Is this correct? (Y/N): ");
string nameConfirm = Console.ReadLine();
return nameConfirm;
}
How can I change this so it outputs both nameConfirm and name. The nameConfirm goes into:
static string stageOne(string nameConfirm)
{
while (nameConfirm != "Y")
nameConfirm = Program.characterName();
if (nameConfirm == "Y")
{
Console.WriteLine("Alright, lets continue.");
nameConfirm = Console.ReadLine();
}
return nameConfirm;
That works fine but I want to be able to call upon the name later if its needed.