How can I insert these characters in C#

Question:

How can I insert these characters in

┍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┑
│                                            │   
│                                            │   
│                                            │   
│                                            │   
│                                            │   
└╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┚

I wanted to use them to create menus on the console.

Answer:

Well I made a menu once like this: where

(char) '\u2554'

you replace according to the table of the link on the Wiki

            string MenuDesenho = string.Empty;
            for (int i = 0; i < 36; i++) {
                MenuDesenho +=(""+(char)'\u2550');
            }
               string menu =((char)'\u2554'+MenuDesenho+(char)'\u2557'+"\n");
                menu += ((char)'\u2551' +"              Menu                  "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 1. Para adicionar um Quadrado      "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 2. Para adicionar um Retangulo     "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 3. Para adicionar um Circulo       "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 4. Para Remover uma figura         "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 5. Para mostrar a lista            "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 6. Para limpar todas as figuras    "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 7. Para limpar a Tela              "+(char)'\u2551'+"\n");
                menu += ((char)'\u2551' +" 8. Para Sair                       "+(char)'\u2551'+"\n");
                    menu += ((char)'\u255a'+MenuDesenho+(char)'\u255d');
Console.Write(menu);

here the link to see the ASCII Box codes

https://en.wikipedia.org/wiki/Box-drawing_character

On this link you can have more detailed information on the language.

http://graphemica.com/%E2%95%93

Look in dotnetfiddle how it looks.

According to your image the code would be like this:

using System;


public class Program
{
    public static void Main()
    {

        string MenuDesenho = string.Empty;
            for (int i = 0; i <28; i++) {
                MenuDesenho +=(""+(char)'\u254D');
            }
               string menu =((char)'\u250D'+MenuDesenho+(char)'\u2511'+"\n");
                menu += ((char)'\uFFE8' +"              Menu                  "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 1. Para adicionar um Quadrado      "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 2. Para adicionar um Retangulo     "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 3. Para adicionar um Circulo       "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 4. Para Remover uma figura         "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 5. Para mostrar a lista            "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 6. Para limpar todas as figuras    "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 7. Para limpar a Tela              "+(char)'\uFFE8'+"\n");
                menu += ((char)'\uFFE8' +" 8. Para Sair                       "+(char)'\uFFE8'+"\n");
                menu += ((char)'\u2514'+MenuDesenho+(char)'\u251A');
        Console.Write(menu);
    }
}
Scroll to Top