Wikipedia has a table of similar symbols.
In C#, to make a char
literal corresponding to U+2022 (for example) use '\u2022'
. (It's also fine to cast an integer literal as you do in your question, (char)8226
)
Late addition. The reason why your original approach was unsuccessful, is that the value 149
you had is not a Unicode code point. Instead it comes from Windows-1252, and Windows-1252 is not a subset of Unicode. In Unicode, decimal 149
means the C1 control code "Message Waiting".
You could translate from Windows-1252 with:
textBoxNewPassword.PasswordChar =
Encoding.GetEncoding("Windows-1252").GetString(new byte[] { 149, })[0];
but it is easier to use the Unicode value directly of course.
In newer versions of .NET, you need to call:
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
before you can use something like Encoding.GetEncoding("Windows-1252")
.