Struct vs Class | Value type vs Reference type | Stack vs Heap

preview_player
Показать описание
#structVsClass #valueVsReference #stackVsHeap

Struct Vs Class | Value type Vs Reference type | Stack Vs Heap. This is very important question for interviews. And its good to know these for your day to day programming as well!

▬▬▬▬▬▬ 🔗 Useful Links 🔗 ▬▬▬▬▬▬

▬▬▬▬▬▬ 🙏🥰 Support My Channel 🥰🙏 ▬▬▬▬▬▬

Here are all the products I use on daily basis. Buy from my link and make me few bucks 🥰🙏

DISCLAIMER: This video and description may contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Keep creating more videos on c# good explanation

shiprapankaj
Автор

Thanks a lot for explain in depth, but I'm not sure when to use class vs struct. I think, If we need an instance of an object through the app & we want to control it’s identity, classes are the solutions else use struct. 

Second point is how to identify large program & small program, is there any criteria.

suhaspathak
Автор

First thanks for the video.
Some tips:
1- make the code in full screen, not just small part.
2- make the code live coding not just screenshot.

But I think sharing a reference always faster than coping a value, imagine you have a big chunk of data, do you think coping the whole data faster or just referencing that data to other object ?
And comparing between classes and structs doesn't make sense when you say that for small projects and the other for big projects, I think it depends on the need of that project (eg. if you need inheritance use a class if not just stick to a struct, but there also so many cases ) .
Like for the support 😊.

aymanatallah