Lecture notes and code examples

Click on a title to see the list of topics in that chapter. Use the download links to get lecture handouts in PDF format or lecture slides in PPT format. You can also get code examples for most topics, as Visual Studio 2010 solutions. These should also work in Visual Studio 2012. Please note that the code examples are an important part of the lecture materials

1. Introduction to C# and Visual Studio

Download Handouts (PDF format)  Slides (PowerPoint)  

Contents
Module information
What is C#?
The .NET Framework
Visual Studio
Visual Studio projects

2. C# object oriented programming basics

Download Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
What is OO programming?
Objects
Encapsulation and information hiding
Responsibilities and collaboration
Messages
Classes
Methods and algorithmss
Relationships

3. Creating C# classes

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Code blocks
Namespaces
Instance variables, constants and static variables
Constructors
Methods
Comments
Properties
Selection and iteration
4. C# data types, objects and references

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Data types
Variables
Operating memory - stack and heap
Method calls
Object references
Parameter passing
Garbage collection
Value types and reference types
Struct and enum
Creating and compiling C# types
Assemblies
How a C# program runs

5. Interfaces, polymorphism and inheritance

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Interfaces
Reference and runtime types
Interface polymorphism
Inheritance
.NET base types
Abstract and sealed classes
Inheritance polymorphism
Casting
Using composition instead of inheritance

6. Arrays and collections

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
One-to-many relationships
Arrays
Abstratct data types
List ADT
ArrayList implementation
LinkedList implementation
Choosing a list
Traversing collections and IEnumerable
Stack ADT
Queue ADT
Dictionary ADT
Generics and collections
.NET Framework collection types - List, Dictionary

7. Implementing a model using C#

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
UML models
Order system example
Class diagram and sequence diagram
Creating C# classes
Implementing relationships
Coding patterns
One-to-one coding pattern
One-to-many coding patterns
Simple association coding pattern

8. Exceptions, testing and debugging

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Writing quality software
Runtime errors
Exceptions
Handling exceptions
Throwing exceptions
Custom exception classes
Testing
Unit testing
Debugging

9. Creating GUIs with Windows Presentation Foundation

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Graphical user interfaces
WPF and XAML
GUI toolkits and controls
XAML and code-behind files
Using model classes
Layout controls
Binding

10. Persistent storage

Download
Handouts (PDF format)  Slides (PowerPoint)  Code (VS2010 C#)

Contents
Types of persistent storage
Working with files and folders
Reading and writing files
Working with databases
Querying databases
Data binding in WPF

Some notes are in PDF format - you may need Adobe Reader to view and print them. You can download it using the link below:

Get Adobe Reader