Expression classifications
Expression classifications An expression is classified as one of the following: A value. Every value has an associated type. A variable. Every variable has an associated type, namely the declared type of the variable. A namespace. ACiteste tot ... 634 cuvinte
Dimensiune mica - fara poza |
|
|
Expression statements
Expression statements An expression-statement evaluates a given expression. The value computed by the expression, if any, is discarded. expression-statement: statement-expression ; statement-expression: invocation-expression object-creCiteste tot ... 62 cuvinte
Dimensiune mica - fara poza |
|
|
Unsafe code - Unsafe contexts
Unsafe code The core C# language, as defined in the preceding chapters, differs notably from C and C++ in its omission of pointers as a data type. C# instead provides references and the ability to create objects that are managed by a garbage cCiteste tot ... 5091 cuvinte
Dimensiune mare - fara imagini |
|
|
Logical operators
Logical operators The &, ^, and | operators are called the logical operators. and-expression: equality-expression and-expression & equality-expression exclusive-or-expression: and-expression exclusive-or-expression ^ andCiteste tot ... 335 cuvinte
Dimensiune mica - fara poza |
|
|
Interoperability - The ComAliasName attribute
Interoperability The attributes described in this chapter are used for creating programs that interoperate with COM programs. The ComAliasName attribute namespace System.Runtime.InteropServices public string Value } Citeste tot ... 1010 cuvinte
Dimensiune mica - fara poza |
|
|
Types - Predefined types, Array
Types C# supports two kinds of types: value types and reference types. Value types include simple types (e.g., char, int, and float), enum types, and struct types. Reference types include class types, interface types, delegate types, and arrayCiteste tot ... 2188 cuvinte
Dimensiune medie - fara imagini |
|
|
Primary expressions - Postfix increment and decrement operators
Primary expressions Primary expressions include the simplest forms of expressions. primary-expression: array-creation-expression primary-expression-no-array-creation primary-expression-no-array-creation: literal simple-name parenthesizCiteste tot ... 6183 cuvinte
Dimensiune mare - fara imagini |
|
|
Program Startup
Program Startup Program startup occurs when the execution environment calls a designated method, which is referred to as the program's entry point. This entry point method is always named Main, and can have one of the following signatures:Citeste tot ... 442 cuvinte
Dimensiune mica - fara poza |
|
|
User-defined conversions
User-defined conversions C# allows the pre-defined implicit and explicit conversions to be augmented by user-defined conversions. User-defined conversions are introduced by declaring conversion operators (§10.9.3) in class and struct typeCiteste tot ... 1301 cuvinte
Dimensiune mica - fara poza |
|
|
Labeled statements
Labeled statements A labeled-statement permits a statement to be prefixed by a label. Labeled statements are permitted in blocks, but are not permitted as embedded statements. labeled-statement: identifier : statement A labeled stateCiteste tot ... 156 cuvinte
Dimensiune mica - fara poza |
|
|
void Finalize();Constants
void Finalize();Constants A constant is a class member that represents a constant value: a value that can be computed at compile-time. A constant-declaration introduces one or more constants of a given type. constant-declaration: attributesCiteste tot ... 465 cuvinte
Dimensiune mica - fara poza |
|
|
Namespaces and assemblies
Namespaces and assemblies The programs presented so far have stood on their own except for dependence on a few system-provided classes such as the System.Console class. It is far more common for real-world programs to consist of several differeCiteste tot ... 434 cuvinte
Dimensiune mica - fara poza |
|
|
Enums
Enums An enum type declaration defines a type name for a related group of symbolic constants. Enums are used for “multiple choice” scenarios, in which a runtime decision is made from a fixed number of choices that are known at compile-time.Citeste tot ... 135 cuvinte
Dimensiune mica - fara poza |
|
|
Member access - Declared accessibility
Member access Declarations of members allow control over member access. The accessibility of a member is established by the declared accessibility (§3.5.1) of the member combined with the accessibility of the immediately containing typeCiteste tot ... 1691 cuvinte
Dimensiune medie - fara imagini |
|
|
Structs - Struct declarations
Structs Structs are similar to classes in that they represent data structures that can contain data members and function members. Unlike classes, structs are value types and do not require heap allocation. A variable of a struct type directly cCiteste tot ... 1956 cuvinte
Dimensiune medie - fara imagini |
|
|
Explicit conversions
Explicit conversions The following conversions are classified as explicit conversions: All implicit conversions. Explicit numeric conversions. Explicit enumeration conversions. Explicit reference conversions. Explicit interfacCiteste tot ... 1079 cuvinte
Dimensiune mica - fara poza |
|
|
Default values
Default values The following categories of variables are automatically initialized to their default values: Static variables. Instance variables of class instances. Array elements. The default value of a variable depends on theCiteste tot ... 91 cuvinte
Dimensiune mica - fara poza |
|
|
Instance constructors
Instance constructors An instance constructor is a member that implements the actions required to initialize an instance of a class. Instance constructors are declared using constructor-declarations: constructor-declaration: attributesopt Citeste tot ... 1125 cuvinte
Dimensiune mica - fara poza |
|
|
Unary expressions
Unary expressions Issue We need to write this section. unary-expression: primary-expression + unary-expression - unary-expression ! unary-expression ~ unary-expression * unary-expression pre-increment-expression preCiteste tot ... 1191 cuvinte
Dimensiune mica - fara poza |
|
|
Declaration statements
Declaration statements A declaration-statement declares a local variable or constant. Declaration statements are permitted in blocks, but are not permitted as embedded statements. declaration-statement: local-variable-declaration ; local-Citeste tot ... 372 cuvinte
Dimensiune mica - fara poza |
|
|
Alte pagini