Chapter 2. Data Types
From chapter's 1's HelloWorld program, you got a feel for the C# language, its structure, basic syntax characteristics, and how to write the simplest of programs. This chapter continues to discuss the C# basics by inves...
Fundamental Numeric Types
The basic numeric types in C# have keywords associated with them. These types include integer types, floating-point types, and a decimal type to store large numbers with a high degree of accuracy.
Integer Types
There ...
More Fundamental Types
The fundamental types discussed so far are numeric types. C# includes some additional types as well: bool, char, and string.
Boolean Type (bool)
Another C# primitive is a Boolean or conditional type, bool, which represen...
null and void
Two additional keywords relating to types are null and void.null is a literal value used to indicate that the data type (specifically, a reference type) is assigned nothing. void is used to indicate the absence of a type or the abs...
Categories of Types
All types fall into two categories: value typesand reference types. The differences between the types in each category stem from the fact that each category uses a different location in memory: Value type data is stored on the ...
Nullable Modifier
As I pointed out earlier, value types cannot be assigned null because, by definition, they can't contain references, including references to nothing. However, this presents a problem in the real world, where values are missing. W...
Conversions between Data Types
Given the thousands of types predefined in the various CLI implementations and the unlimited number of types that code can define, it is important that types support conversion from one to another where it makes sens...
Arrays
One particular aspect of variable declaration that Chapter 1 didn't cover is array declaration. With array declaration, you can store multiple items of the same type using a single variable and still access them individually using the index...
Summary
Even for experienced programmers, C# introduces several new programming constructs. For example, as part of the section on data types, this chapter covered the type decimal that can be used accurately for financial calculations. In additio...
AJAX popular information C# language guides Windows books and cookbooks
.......
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.