Please enable JavaScript.
Coggle requires JavaScript to display documents.
C# Manipulating Data, Character Escape sequences: This is a sequence of…
C# Manipulating Data
Variables and Data
A variable is a named location where you can store something. You can think of it as a box of a particular size with a name painted on the box.
You also need to choose the typeof the variable (particular size and shape of box) from the range of storage types which C# provides. The type of the variable is part of the metadataabout that variable.
Storing Numbers
Reals: we can never hold what we are looking at exactly. Even if you measure a piece of string to 100 decimal places it is still not going to give you its exact length -you could always get the value more accurately.
-
-
-
-
Integers: individual values we can hold the value exactly; you always have an exact number of these items.
-
-
-
-
Storing Text
Char variables
A char is a type of variable which can hold a single character. C# uses a character set called UNICODE which can handle over 65,000 different character. 'A'
Character codevalues: C# uses the Unicode standard to map characters onto numbers that represent them. If you wish, you can express a character literal as a value from the Unicode character set. you must express this value in hexadecimalwhich is a little bit harder to use than decimal
String variables
A type of box which can hold a string of tex. A string variable can hold a line of text. However, because there are special characters which mean it is perfectly possible for a single string to hold a large number of lines of text.
-
-
-
Identifiers
-
-
-
The convention in C# for the kind of variables that we are creating at the moment is to mix upper and lower case letters so that each word in the identifier starts with a capital:This is sometimes called camel case, presumably because of the "humps" in the identifier which are caused by the capitals.
-
-
Character Escape sequences: This is a sequence of characters which starts witha special escape character
-
-
-
-
-