tags:

views:

165

answers:

4

Please tell me how can i show symbols like "lambda" or Mu using c#.net in desktop application. what i think is we may do it using ASCII values and convert.toChar();.. if i am right that please give me link of page where i can get ASCII values of all such a scientific symbols.

Please give me link of any URL which contains list of such a ASCII numbers.

A: 

Try this

char c = '\u03BB'; //03BC
System.Console.WriteLine(c.ToString());

does it work for you?

Data-Base
+2  A: 

C# applications are all Unicode - so there should be no problem assigning Unicode strings to the controls' text, for example:

textBox1.Text = "this is a lambda symbol - λ";
mcm69
+3  A: 

Open the Windows character map (charmap.exe), select a Unicode font (Arial should suffice) and copy the symbols into your source code or resources. It's just characters. Of course, you can also switch to Greek keyboard layout, so you can write the characters directly rather than going the charmap route.

Note that you need to use a Unicode font for the labels. You can use charmap to look up which font has Greek characters.

OregonGhost
+6  A: 

Please tell me how can i show symbols like "lambda" or Mu using c#.net in desktop application.

You don't have to do anything special. Just use whatever letters you want in either the IDE or in strings in the program. C# treats Greek letters the same as any other letters; they are not special.

what i think is we may do it using ASCII values and convert.toChar();

Hold on, I have a phone call. Oh, it's for you. It's 1968 calling, and they want their character set back. :-)

ASCII proper only has 95 printable characters, and Greek letters are not among them. ASCII was invented for teletypes back in the 1960's; we don't use it anymore. Characters in modern programming environments are represented using Unicode, which provides uniform support for tens of thousands of characters in dozens of alphabets.

if i am right then please give me link of page where i can get ASCII values of all such a scientific symbols.

You can get a list of all the Unicode characters at unicode.org. But like I said, you don't need to. You can just embed the character you want directly in the text. There's no need to resort to clumsy tricks like unicode escapes. (Unless, of course, you are planning on sending your source code to your coworkers using a 1970's era teletype machine.)

Eric Lippert