Changes

Jump to: navigation, search

C Sharp Variables and Constants

5 bytes removed, 16:32, 14 January 2008
C# Character Variable Type
== C# Character Variable Type ==
When we talk about ''characters'' we are referring to individual letters and numbers. For example, the letter 'a' is a character, as is the visual representation of the number '1'. Such characters may be stored in a C# ''char'' variable. A ''char'' variable can contain one character and one character only. It is important o to be aware that characters a ''character'' is not limited to those in the English alphabet. A character stored in a ''char'' variable can be Chinese, Japanese, Arabic, Cyrillic, Hebrew or any other type of character you care to mention.
In addition, characters can be used for counting in loops and even in mathematical expressions. To assign a character to a variable simply surround the character with singe quotes:
</pre>
C# provides a number of special character constants which have a special meaning when displayed. These special constants perform such tasks as displaying tab and new lines in displayed text. The following table lists the characters, all of which are identified by a preceding backslash (\):
<table border="1" cellspacing="0">

Navigation menu