Search code examples
c#c#-4.0mathroman-numerals

Overline in console programming


Just a quick question. For the roman numerals above 3999, we used to represent them using a overline. For representing 4000, we will be using the following:

So, to display this overline, what should I do? Also, please advice me which of the above is right?


Update #1

I saw somewhere that we can use Unicode Characters by using the following code:

Console.OutputEncoding = System.Text.Encoding.Unicode;
Console.WriteLine("H\u0305");
Console.WriteLine("\u0305H");
Console.ReadLine();

After putting this code, I have set my console to use Consolas font at 14pt. I got this output:

I was expecting either of the code to show me a combined version, but no avail.


Solution

  • In the console? You can't. Drawing to the console in such a manner is not possible as the console only supports characters.

    One does exist in Unicode (as seen here) but this is merely an overlined space.