|
Overview
C#: Hello World |Common Intermediate Language |The .NET Virtual
Execution System |Preprocessing |C# tokens, Identifiers, Keywords,
Declarations, Expressions
Numeric
Types
Integer types | Integer overflow |Floating point types |Decimal,
char |Conversions | The typename keyword aliases |Operators
| Precedence | Associativity | Evaluation Order
Methods
Arguments & Parameters | Copy Parameters | Ref Parameters
| Out Parameters | Overloading Methods, Method Restrictions
Exceptions
Why exceptions? | The throw statement | The try statement
| Catch blocks |Finally Blocks | Lock statements
Statements
Declarations & expressions | Blocks | Name scope | The
return statement | The bool type | The if statement The switch
statement | Case | The while statement | The do statement
| The for statement | The foreach statement | The continue
statement | The break statement
Namespaces
Why namespaces? | Using directives | Using aliases
Enums
and Structs
Values vs. references | Declaring enums | The System.Enum
class |Using enums | Enum conversions | Declaring structs
| Creating values | Struct constructors | Chaining constructors
| Instance fields, static fields | Readonly fields | Cconst
fields | Local variables | Static constructor | Copying
Operators
Syntax and restrictions | Assignment | Compound assignment
| Increment & decrement | Operators families | Implicit
conversions | Explicit conversions | Examples
Properties
Why Properties? | Get accessors | Set accessors | Static properties
| Property restrictions | Comparing properties to methods
| Comparing properties to fields
Indexers
Syntax | Get accessors | Set accessors | Indexer restrictions
| Comparing indexers to arrays | Examples
Chars
& Strings
The
char type | The string type | String is immutable | The System.String
class | The System.StringBuilder class | String literals |
Verbatim string literals | String operators | String conversions
Arrays
Declaring array variables | Creating array instances
| Initializing arrays | The System.Array class | The foreach
statement | Variadic methods | The params keyword | Params
+ object | Ragged arrays
Classes
Declaring classes | Creating objects | Constructors | Chaining
constructors | Instance fields | Static fields | Readonly
fields | Const fields | Static constructors | Copy parameters
| Ref parameters | Out parameters
Boxing
Value types compared to reference type | Structs compared
to classes | Everything derives from object | A problem, the
solution - boxing, unboxing | The System.Object class | Do
structs really derive from object?
Inheritance
Derivied classes - base classes | Inheritance syntax
| Calling base class constructors | Multiple inheritance |
Virtual methods | Override methods | Sealed methods | New
methods
Interfaces
Multiple interfaces | Implicit interface implementation
| Explicit interface implementation | Interface property,
interface indexer | The is operator, the as operator, the
typeof operator
Abstract Classes
Abstract classes | Abstract methods | Sealed classes | Sealed
methods | Complete type/method combination | Summary
Garbage
Collection
Object birth vs object death | Object.Finalize | Destructors
| Deterministic finalization | The using statement | The IDisposable
interface
Delegates
Typesafe callbacks | Declaring a delegate type | Creating
a delegate instance | Instance method callback | Static method
callback | Multicast delegates
Events
Declaring
delegate fields as events | EventHandler | EventsArgs | Event
publication | Event subscription | Examples from System.WinForms
| Event properties
Assemblies
What
is an assembly? | Deploying an assembly | Versioning an assembly
| Versioning policies | Internal access | Declaring nested
types | Nested access | Access modifiers | Nested access semantics
Attributes
What are attributes? | Declaring an attribute class | Tagging
a code element with an attribute | Controlling attribute usage
| Controlling multiple tags | Positional parameters | Named
parameters | Metadata
|