GAMES IN PROGRESS
Latest Videos
Home
/
Indie Game Developers
/
Tarodev
/
Value & Reference types in C#. Write Better Code!

Value & Reference types in C#. Write Better Code!

15 min
Value vs reference types. Stack vs heap. These are fundamental concepts to understand if you wish to write performant code. Learn the characteristics of value and reference types and how they're allocated to memory. Learn how StackOverflowException occurs and how to fix and prevent them. โค๏ธ Become a Tarobro on Patreon: https://www.patreon.com/tarodev ========= ๐Ÿ”” SUBSCRIBE: https://bit.ly/3eqG1Z6 ๐Ÿ—จ๏ธ DISCORD: https://discord.gg/tarodev โœ… MORE TUTORIALS: https://www.youtube.com/tarodev 0:00 - whatever, intro I guess 0:37 - value types / structs 2:00 - reference type / class 3:00 - stack & heap 3:27 - stack example 5:57 - heap example 8:47 - when to use one over the other 11:30 fix StackOverflowException 13:15 - Bonus: strings