0

I'm trying to change the font size at runtime, in C#, but I can't figure it out on how to do that !

Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("\nWelcome to Hotel\n");
Console.WriteLine("\nHere's the menu\n");

Output:

Like, "Welcome to hotel" should be printed in the font size more than the rest of the output.

Klaus Gütter
  • 11,151
  • 6
  • 31
  • 36
Sooraj
  • 1
  • 4
    Console output doesn't generally allow for different font sizes. You're lucky if you can get colour... if you need a richer interface, I'd recommend considering a GUI or web interface. – Jon Skeet Sep 05 '22 at 10:43
  • The console output itself does not know about fonts. It's just plain text. If this text is being displayed by another application (for example Visual Studio's console viewer), you have to manipulate this external application to modify the texts formatting. – SME_Dev Sep 05 '22 at 10:45
  • That said, you could make a GUI that emulates a console and set the font in that. – Traveller Sep 05 '22 at 11:27

0 Answers0