Classes, Records, Structs, and Tuples gives you information to create reference or value types, create and use tuples, and make use of the C# 9 enhancement to create and use records.
This chapter contains the following code samples:
- TypesSample (structs, classes, records)
- ClassesSample (members of classes)
- MathSample (declare a type with methods and properties, use the type)
- MethodSample (instance and static methods)
- ExtensionMethods (declaring and using extension methods)
- RecordsSample (records)
- StructsSample (structs)
- EnumSample (using the enum keyword)
- RefInOutSample
- TuplesSample
- PatternMatchingSample
For code comments and issues please check Professional C#'s GitHub Repository
Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.
Thank you!
New sample:
- StructRecordSample (record struct)
Udpated sample:
- StructsSample (parameterless constructor)