I am trying to make an easy and clean solution for my code to recieve a name from input from user and printing it out with uppercase on the first letter only. I have tried for a long time but cannot come to a solution, I am now trying to make it by using an array and selecting the first letter but i get this error message "No overload for method 'ToUpper' takes 0 arguments"
** fn[0].ToUpper()** ?
static void Introduce()
{
Console.Write("Hi! What is your first name?");
fn = Console.ReadLine();
Console.Write("Hi! What is your last name?");
ln = Console.ReadLine();
name = fn[0].ToUpper() + " " + ln[0].ToUpper();
Console.WriteLine(name);
}
Would really appriciate any help!
Using .ToUpper and making it into an array and selecting the first letter [0] but with an error message.