Advertisement
adriyanbulgary

PrimitiveDataTypesAndVariablesC#

May 29th, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2. /*
  3.  * Declare a character variable and assign it with the symbol that has
  4.  * Unicode code 42 (decimal) using the '\u00XX' syntax, and then print it
  5.  */
  6. class UnicodeCharacter
  7. {
  8.     static void Main()
  9.     {
  10.         char number = '\u002A';
  11.         Console.WriteLine(" The symbol is {0}\n The ASCII code of {0} is {1}",number,(int)number);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement