Lecture overview -- Keyboard shortcut: 'u'  Previous page: Structs versus classes -- Keyboard shortcut: 'p'  Next page: Examples of immutable structs in C# -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Reference types, Value types, and Patterns - slide 13 : 29

Examples of mutable structs in C#

Examples of struct Point

The examples on this page illustrate mutable Points programmed with structs

Point.cs
The struct Point - mutable.
MoveClient.cs
Moving a point by mutation.
output
Output from the application.
Point.cs
The struct Point - mutable, where move returns a Point.
Client.cs
Application the struct Point - Cascaded moving.
output
Output from the application.