Great, simple video. One thing that definitely needs to be understood is that structure are of a value type which means when you have one struct equal = struct, it is copying the actual values, not making a reference to the struct. This is the key difference between struts and classes .
@buddyroach3 жыл бұрын
this video is awesome. easy to follow and understand, high quality, great voice, charming accent, and i love the way your keyboard sounds muffled. real soothing and helps ease the mind as i watch and learn. this is perfect.
@henrychen5404 жыл бұрын
Literally the first minute answered my question "what the hell are structs?" They're your diy value types and classes are your diy reference types. AWESOMEEEEE
@AsakuraAvan3 жыл бұрын
@Lincoln Wells doesn't fucking work you twat
@Spectrum163 жыл бұрын
@@AsakuraAvan They're bots
@shanejackson25883 жыл бұрын
Sorry to be so offtopic but does anyone know of a method to log back into an instagram account?? I was dumb lost my account password. I would love any tips you can give me
@piercejake20333 жыл бұрын
@Shane Jackson instablaster :)
@shanejackson25883 жыл бұрын
@Pierce Jake thanks for your reply. I found the site thru google and I'm trying it out now. Looks like it's gonna take a while so I will get back to you later when my account password hopefully is recovered.
@Emiya_familia5 жыл бұрын
After spending some time reading my lesson chapter from C# step by step, i like to look up video for better understanding. I spend an hour looking for a better understanding of struct and your video were easy to understand and helpful. keep up the good work.
@horizon6309 Жыл бұрын
Thank you for making this video. Very beautiful, simple and straightforward explanation and example.
@Geri3d7 жыл бұрын
I Like your fast typing and correcting errors so fast, it dont get boring to the end and its not my language! thumbs Up
@StevenWong19956 жыл бұрын
this is the simple yet informative video that explains things in programming. great work! thanks!
@sabebarker3 жыл бұрын
Exceptionally clear tutorial. Thanks heaps!
@JoelMatthews-b8n9 ай бұрын
Brilliant video, thank you!
@legendaryswordsman22792 жыл бұрын
Great tutorial, straight to the point with no bullshit, you've earned a like from me
@falcon32057 жыл бұрын
Thank christ, someone who speaks Australian ;)
@aussieraver71824 жыл бұрын
agreed
@toystoryscarymovie-forkids3323 Жыл бұрын
best video so far on youtube on structs. ive subscribed to your channel will take further lessons on other topics from you. you are truly gifted in simplifying knowledge
@kylekeenan34852 жыл бұрын
Did I miss why you would use a struct instead of a class to represent something such as the car? What if your car would also need methods such as accelerate()?
@NITHISHKUMAR-jt9lw11 ай бұрын
Hey! The video was really simple and easy to understand.
@toystoryscarymovie-forkids3323 Жыл бұрын
from your explanations Structs are like classes without the constructor , method and without the creation of objects.
@manofmesopotamia76026 жыл бұрын
i really like the video, i think struct are useful if we imagine that we are trying to make a table for employees, name, salary, attendance, something like that, instead of repeating the title of the table, we make it in a struct
@rursus83547 ай бұрын
_"struct"_ is rather than a shortened form of "structure" a notion inherited from C++, when distinguishing it from classes, and in C++ originally from C, where it is a dialectal synonym of "record", and means: _"aggregation of stuff"._ In C++ it means: _"d*rn*d class where every attribute is by default public"._ C# is naturally much smarter, and defines as _"class for value type objects"_ in contradistinction to _"class for reference type objects"._
@srijantamang46872 жыл бұрын
Thanks man this really helped me in my Software Design Class. Great Video 👍
@TebogoMotlhale4 жыл бұрын
i wouldNT say you use a struct to create a "Custom" data type, i would rather say a "Compound" data type or "Composite" data type. the same thing appears to be the case about Classes to me, they always strike me as some kind of Composite/Compound data types, rather than a feature that truly allows us to create our OWN genuine custom data types. your examples and explanations going forward are amazing though , beautiful 👌👌👌👌
@digitalconsciousness3 жыл бұрын
It seems that the purpose of structs might overlap some with class inheritance or class extensions, the first of which you just make a parent class inherit, the second of which is simply an abstract static class. So is there any need to use structs within either of those two options or would you just abandoned structs and just use the inheritance or extensions instead? I am hoping someone smarter than me will respond. Thanks!
@s34nTravels Жыл бұрын
- Struts are value type objects, not reference (unlike classes), so its very important to only use struts for simple data types. It will have a large memory footprint. - Can structs contain reference types? Yes, it is possible, and yes, it is usually a bad practice. If you look at the .NET framework itself, you'll see virtually all structs contain primitive value types alone. - Struct members cannot be abstract, sealed, virtual, or protected. I.e. no polymorphism (i.e. method overriding) - It's good practice to mark struts as readonly
@renijr6 жыл бұрын
37/5000 It was to the point, optimal explanation. tks
@AymenAbdessamad Жыл бұрын
a quick question pleaase ; can we create an instance from that structure using Employee emp1 = new Employee{ name = ""; age = 444; } or not
@aussieraver71822 жыл бұрын
Thanks for the tutorial. Whats the difference between creating a custom class object and a struct of a Car then? EDIT: It seems that classes use memory on the heap while structs use memory on the stack.
@s34nTravels Жыл бұрын
- Struts are value type objects, not reference (unlike classes), so its very important to only use struts for simple data types. It will have a large memory footprint. - Can structs contain reference types? Yes, it is possible, and yes, it is usually a bad practice. If you look at the .NET framework itself, you'll see virtually all structs contain primitive value types alone. - Struct members cannot be abstract, sealed, virtual, or protected. I.e. no polymorphism (i.e. method overriding) - It's good practice to mark struts as readonly
@aussieraver7182 Жыл бұрын
@@s34nTravels Cheers for the explanation, it solidified my knowledge of it and more! I don't think I've ever had to use a struct in my role.
@s34nvideos Жыл бұрын
@@aussieraver7182 I understand. I rarely see them myself. If you want to 'contain' a few value types, they are kinda useful, but personally I mostly use them when mocking up sample stuff.
@EpicGamer63637 Жыл бұрын
Amazing explanation :)
@-Pedry11 ай бұрын
feel like structs are glorified classes (- the methods/functions) xd is there a performance difference?
@adsfadfadfish3 жыл бұрын
Wow, great explanation!
@nandorbacso46255 жыл бұрын
Thanks mate, the very least thing I can make is to like + comment + subscribe for this amazing explanation ;)
@iknowtoomuch Жыл бұрын
THANK YOU!
@RavenFelman Жыл бұрын
What if i want to print all the properties that are inside a Struct?
@themaskedcondom29712 жыл бұрын
I keep getting this error: A 'struct' with field initializers must include an explicitly declared constructor.
@LyraBones4 жыл бұрын
How can you collect values from multiple variables in different scopes to be in one struct?
@kandasamyrajan5 жыл бұрын
Thanks for the excellent explanation.
@nkululekosibeko4657 Жыл бұрын
Thank you so much
@markharwood67948 ай бұрын
NEVER use a float to represent a money value - Use decimal or int/100 also works
@jonathanallanhermawan17373 ай бұрын
Thank you mann
@fruit.83024 жыл бұрын
Australian coder? Rarest kind out there!
@tomsawyer17995 жыл бұрын
So if we started creating some employees the person has to go into the code, create a new object for a new employee and recompile? 🤔
@henrychen5404 жыл бұрын
Right but that info isn't exactly protected well, since it can be changed since it is a reference type. A new employee should have its own constant and immutable name, function, and id for example. That is where structs are incredibly useful.
@WirtyDord5 жыл бұрын
Anyone familiar with Unity, is this basically the same as a Scriptable Object? I've been learning about those recently and it sounds exactly the same to me. I understand that a Scriptable Object would get it's own script rather than be embedded in another script, but is that the only difference?
@CustardCream334 жыл бұрын
I'm sure you've found out the answer by now, but for anyone new wondering the same thing: Structs and ScriptableObjects are not the same. ScriptableObjects inherit from UnityEngine.Object and so are subclasses. This means they are used with references. This makes it more work to create a new copy of them. Structs on the other hand, are easy to create copies of, as seen in this video. Hope this helps anyone.
@nmana97593 жыл бұрын
what's the difference between struct type and the normal set get method ? I see no difference in them
@chainjail9242 жыл бұрын
YEAH THATS WHAT I THOUGHT
@riskemer36214 жыл бұрын
thanks for the help
@Popart-xh2fd3 жыл бұрын
Struct = Structures right?
@LIONSKI4205 жыл бұрын
WHAT A KEYBOARD IS IT
@bedouinangel4 жыл бұрын
short informative video
@bbdesign54006 жыл бұрын
Thanks!
@JRW-FSDev Жыл бұрын
Not explaining the difference between a struct and a class seems like a big missing from this explanation.
@longjohn79923 жыл бұрын
Soo.... A Class but without methods?
@ivandagiant3 жыл бұрын
Yeah that’s what is confusing me. These seem like classes to me
@GamingBeast37 жыл бұрын
Can you explain me this line of code please it's in vb.net Regex.Replace("ThisIsACamelCaseString", "([a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))", "$1 ")
@NicholasDingle7 жыл бұрын
Regular Expressions are the sort of thing that I constantly have to relearn because I forgot it all. There are heaps of resources for learning regex on the web.
@GamingBeast37 жыл бұрын
Nicholas Dingle okay thanks
@muhammadarifkhan9517 жыл бұрын
sir im muhammad ARIF FROM PAKISTAN IM STUDENT C# PROGRAMMING LANGUAGES I WANTS ITS PLZ HELP ME