https://github.com/hpt-dev/everythingaboutrecords
https://github.com/hpt-dev/everythingaboutrecords
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hpt-dev/everythingaboutrecords
- Owner: hpt-dev
- Created: 2022-09-10T14:37:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-10T23:53:37.000Z (over 3 years ago)
- Last Synced: 2025-01-14T12:51:26.934Z (over 1 year ago)
- Language: C#
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Everything About Records in C#
Project about learning records in c# used in this video:
https://www.youtube.com/watch?v=IiE5-Txnt28&feature=youtu.be
Records are a great tool that can help improve your code, reduce bugs and stop you having to write as much boiler plate and defensive code. In this video we will cover Reference vs Value Equality, Immutability and what Records are how to use them.
#dotnet #dotnetprogramming #dotnet6 #programming #csharp #programmingforbeginners #csharp #csharptutorial #csharpdotnet #aspnetcore #programmingtutorials
▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
0:00 - Introduction
0:41 - Reference vs value equality with examples
6:15 - Change a class to use value equality example
9:09 - What is immutability
10:30 - How to make a property immutable
11:11 - What is a record and when to use them
12:25 - How to define a record class and record struct with examples
15:14 - Records and equality when using inheritance
Source code from the video (Github):
https://github.com/hpt-dev/EverythingAboutRecords/
Records Documentation:
https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/types/records
Records Tutorial:
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/records