Introduction
The wide world of object-oriented programming (OOP) with C#
()
What you should know
()
1. Theory vs. Practice
Theory vs. practice
()
When a square is not a rectangle
()
When a carpet is art
()
Conclusion
()
2. Examples from .NET
Introduction
()
IEnumerable
()
IEnumerable and foreach
()
File.Open and .Close
()
File.Close in the finally block
()
Keyword using
()
Opening FileStream with StreamReader
()
Processing text with StreamReader
()
IEnumerable and yield return
()
TextReader as base of StreamReader and StringReader
()
Conclusion
()
3. Examples from Windows UI
Introduction
()
Windows Forms controls
()
Windows Forms without the designer
()
Application.Run and .Exit
()
Inheriting from class Form
()
Windows Forms with the designer
()
Event handler for control
()
Windows Forms MVC
()
Adding and organizing forms
()
Create and test a second form
()
Windows Presentation Foundation (WPF) XAML
()
WPF button and event handler
()
Conclusion
()
4. Examples from Board Games
Introduction
()
Chess game model and controller
()
Chess game events
()
Chess game view
()
Apply chess moves
()
Update chess model
()
Add chess pieces
()
Summary of Chess MVC
()
Board game: ChessMoves
()
Create class ChessMove
()
Add members of class ChessMove
()
Implement method ChessMove.Try
()
Invoke ChessMove.Try
()
Summary of ChessMoves
()
5. Examples from the Web
Introduction
()
Create classes User, Post, and Content
()
Write test for use case 1
()
Implement Content.Publish (use case 1)
()
Implement SocialGraph.Follow (use case 2)
()
Write test for use case 3
()
Implement SocialGraph.GetFollows
()
Implement Content.GetFeed
()
Implement Content.Like and .Share
()
Update .GetFeed for likes and shares
()
Summary
()
Ex_Files_OOP_C_Sharp.zip
(1.1 MB)