public static void Main()
string newText = text.FirstCharToUpper();
Console.WriteLine(text + " => " + newText);
public static class StringExtension
public static string FirstCharToUpper(this string input)
throw new ArgumentNullException(nameof(input));
throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input));
return input.First().ToString().ToUpper() + input.Substring(1);