1. C# and the .NET Framework 1 1.1 Similarities between C# and Java 1.2 Differences between C# and Java 1.3 The .NET Framework 1.4 Exercises 2.
First Steps 11 2.1 Hello World 2.2 Structure of C# Programs 2.3 Symbols in C# Programs 2.4 Exercises 3. Types 17 3.1 Simple Types 3.2 Enumerations 3.
3 Arrays 3.4 Strings 3.5 Structs 3.6 Classes 3.7 Object 3.8 Boxing and Unboxing 3.9 Exercises 4. Expressions 31 4.
1 Arithmetic Expressions 4.2 Relational Expression 4.3 Boolean Expressions 4.4 Bit Expressions 4.5 Shift Expressions 4.6 Overflow Check 4.7 Typeof Operator 4.8 Sizeof Operator 4.
9 Exercises 5. Declarations 37 5.1 Declarations in Namespaces 5.2 Declarations in Classes, Structs and Interfaces 5.3 Declarations in Enumeration Types 5.4 Declarations in Statement Blocks 5.5 Exercises 6. Statements 43 6.
1 Empty Statement 6.2 Assignment 6.3 Method Call 6.4 If Statement 6.5 Switch Statement 6.6 While Statement 6.7 Do-While Statement 6.8 For Statement 6.
9 Foreach Statement 6.10 Break and Continue Statement 6.11 Goto Statement 6.12 Return Statement 6.13 Exercises 7. Input and Output 51 7.1 Output on the Screen 7.2 Formatted Output 7.
3 Output on a File 7.4 Input from the Keyboard 7.5 Input from a File 7.6 Reading Command Line Arguments 7.7 Exercises 8. Classes and Structs 57 8.1 Visibility of Members 8.2 Fields 8.
3 Methods 8.4 Constructors 8.5 Destructors 8.6 Properties 8.7 Indexers 8.8 Operator Overloading 8.9 Nested Types 8.10 Differences to Java 8.
11 Exercises 9. Inheritance 79 9.1 Declaration of Subclasses 9.2 Compatibility between Classes 9.3 Overriding versus Hiding of Members 9.4 Dynamic Binding 9.5 Constructors in Superclasses and Subclasses 9.6 Abstract Classes 9.
7 Sealed Classes 9.8 Class Object 9.9 Exercises 10. Interfaces 95 10.1 Declaration and Usage 10.2 Operations on Interfaces 10.3 Extending an Interface 10.4 Name Conflicts 10.
5 Interface IDisposable 10.6 Exercises 11. Delegates and Events 103 11.1 Simple Delegates 11.2 Multicast Delegates 11.3 Creating a Delegate Value 11.4 Events 11.5 Exercises 12.
Exceptions 109 12.1 Try Statement 12.2 Exception Classes 12.3 Throwing Exceptions 12.4 Exceptions in Methods 12.5 Exceptions in Multicast Delegates 12.6 Exercises 13. Namespaces and Assemblies 117 13.
1 Namespaces 13.2 Assemblies 13.3 Exercises 14. Threads 127 14.1 Class Thread 14.2 Thread States 14.3 Aborting a Thread 14.4 Thread Synchronisation 14.
5 Exercises 15. Attributes 139 15.1 Attribute Notation 15.2 Attribute Parameters 15.3 Attributes for Specific Program Elements 15.4 SerializableAttribute 15.5 ConditionalAttribute 15.6 DllImportAttribute 15.
7 Custom Attributes 15.8 Exercises 16. Documentation Comments 149 16.1 XML Tags in Comments 16.2 Generated XML File 16.3 Exercises 17. COM Interoperability 153 17.1 Using COM Objects from .
NET 17.2 Using .NET Assemblies from COM 17.3 Exercises 18. Extract from the .NET Class Library 161 18.1 Utility Classes 18.2 Collections 18.
3 Input/Output Classes 18.4 Reflection 18.5 Exercises 19. Case Studies 185 19.1 Graphical User Interfaces with Windows Forms 19.2 Web Services 19.3 Dynamic Web Pages with ASP.NET 20.
New Language Constructs 207 20.1 Generic Types 20.2 Iterators 20.3 Anonymous Methods 20.4 Partial Types Appendix A.1 Compiler Options A.2 Tools under .NET A.
3 C# Grammar A.4 Unicode and ASCII.