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
Similar example with classes
The struct Point - mutable.
Moving a point by mutation.
Output from the application.
The struct Point - mutable, where move returns a Point.
Application the struct Point - Cascaded moving.
Output from the application.