
Value & Reference types in C#. Write Better Code!
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








![[2D 게임 개발 꿀팁 시리즈] 모바일 성능과 쓰로틀링](https://img.youtube.com/vi/z0bkXem0g7o/hqdefault.jpg)

![[2D 게임 개발 꿀팁 시리즈] 2D 게임에 3D 오브젝트 쉽게 사용하는 방법](https://img.youtube.com/vi/8ytJW1I6Agg/hqdefault.jpg)
![[2D 게임 개발 꿀팁 시리즈] 그림자 최적화로 60FPS](https://img.youtube.com/vi/L494gnEHr5A/hqdefault.jpg)
![[2D 게임 개발 꿀팁 시리즈] 메모리 절약 스프라이트 5가지](https://img.youtube.com/vi/-cxbULpRSXE/hqdefault.jpg)

![[2D 게임 개발 꿀팁 시리즈] Sprite Shape vs. Tilemap](https://img.youtube.com/vi/q5Yeif-jJ2I/hqdefault.jpg)
![[2D 게임 개발 꿀팁 시리즈] 2D 배칭 최적화](https://img.youtube.com/vi/zMMACezlItM/hqdefault.jpg)


![Cards: Tidy Up! [Demo Out Now]](https://img.youtube.com/vi/6DDIfmMYYFs/hqdefault.jpg)
![[2D 게임 개발 꿀팁 시리즈] 2D 배칭 조건](https://img.youtube.com/vi/5DstF95ojw0/hqdefault.jpg)







![[2D 게임 개발 꿀팁 시리즈] 2D 게임 그림자 성능](https://img.youtube.com/vi/yMrlutMnhpc/hqdefault.jpg)

![[2D 게임 개발 꿀팁 시리즈] 성능과 재미 사이](https://img.youtube.com/vi/dE1PNUM40ag/hqdefault.jpg)












![[2D 게임 개발 꿀팁 시리즈] 2D 배칭](https://img.youtube.com/vi/0HO_7fwC_6A/hqdefault.jpg)





























![[2D 게임 개발 꿀팁 시리즈] Runtime Sprite Atlas](https://img.youtube.com/vi/ocFwQ4sogDo/hqdefault.jpg)

































































