How can I display spacial codes in c# Console.WriteLine()
?
Given: symbol = '\u2023';
The escape sequence \u2023
should display ‣
on console in c#. So, How can I get output for the symbol as '‣'
and not '?'
What I get is just a wrong symbole '?'
instead.
public void DisplayPattern (int n, char symbol)
{
string pattern = "";
for (int i = 0; i < num; i++)
{
pattern = new String(symbol, i);
Console.WriteLine(pattern);
}
}