14: Structs And Enums In C# | How To Use An Enum | C# Tutorial For Beginners | C Sharp Tutorial

  Рет қаралды 81,634

Dani Krossing

Dani Krossing

Күн бұрын

In this C# tutorial I will teach about enums and structs which are a type of "mini objects" we can use in our applications.
Link to Enum: docs.microsoft...
Link to Struct: docs.microsoft...
When to use Struct or Classes: docs.microsoft...
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Material for this lesson: / lesson-material-42361704

Пікірлер: 93
@henrychen540
@henrychen540 4 жыл бұрын
this guy is so much better than the $90 course I paid for on udemy
@Dani_Krossing
@Dani_Krossing 5 жыл бұрын
My apologies if I seem tired/agitated on the video ':D This video was my 3rd attempt at recording this since... - My recordings ended up being corrupted - My audio got cut off short (no battery) - My camera ran out of power - I had to use an over complicated way to send my camera files to my primary PC Basicly everything went wrong ':D
@sakkakutamashi1801
@sakkakutamashi1801 5 жыл бұрын
Just a code snippet: if you write cw and then hit tab it automatically writes Console.WriteLine("");
@_samirdahal
@_samirdahal 5 жыл бұрын
@@sakkakutamashi1801 Double tab
@jahanzaibasgher1275
@jahanzaibasgher1275 5 жыл бұрын
It actually made great sense to me. Thanks!
@sh8ma
@sh8ma 5 жыл бұрын
Do you have any plan to complete C# courses i'm desperately waiting for the next episode
@Dani_Krossing
@Dani_Krossing 5 жыл бұрын
@@sh8ma I'm having some technical difficulties with my equipment which is delaying any new videos. I have plans of getting everything fixed but it will be a while before I can afford replacing the broken equipment.
@gamedeveloper9098
@gamedeveloper9098 4 жыл бұрын
THIS GUY IS AWESOME!!! first he knows javascript and then he also knows game development in unity c#......a true PROGRAMMER!!!
@gameofcharging
@gameofcharging 3 жыл бұрын
Not Unity C#, I think, But standard C# Because Unity uses Mono C# to adds more functionality.
@wissalzaher4868
@wissalzaher4868 3 жыл бұрын
Some people just have that ability to teach with clarity, like this guy ! Thanks a lot :)
@d0msch326
@d0msch326 Жыл бұрын
After looking up Enums, because the description in my literature isn't quite good, I found your C# Playlist. Best thing that happened to me for getting into programming.
@leas6817
@leas6817 3 жыл бұрын
OMG ..I had never seen someone teaching codes this clearly and easily... thank you so much
@Duelweb
@Duelweb Жыл бұрын
If you stay on KZbin, you gonna hit a million subs! Clear, and to the point! Many thanks!!
@JonathonMcClung
@JonathonMcClung 3 жыл бұрын
Thanks, bro! This was super helpful! I watched this a few days ago when I was considering using an enum for a switch statement and couldn't imaging why I would want to convert a string into an enum in your final example. Lo and behold, that is exactly what I ended up needing to do further along in my project. I came back here and got the info I was barely paying attention to the first time. Lol
@senayfekadu6859
@senayfekadu6859 5 жыл бұрын
and your video the whole playlist is amazing and doesn't leave a gap which doesn't confuse the student its cool keep it up like the details man
@cainothecreator8363
@cainothecreator8363 2 жыл бұрын
I love your setup. Actually seeing you type is just new and refreshing.
@theaalicha
@theaalicha Жыл бұрын
Youre the only guy on youtube that truly makes me understand every concept. Thank you so much for making these videos
@4FrogsStacked
@4FrogsStacked 2 жыл бұрын
Definitely good to know structs. I've never used them but I did have a question about a struct in a pre-interview assessment test
@muhamadsyahrulfahmie7483
@muhamadsyahrulfahmie7483 5 жыл бұрын
This is the best way of teaching. You deserve for more subscriber.
@shadyismad9419
@shadyismad9419 3 жыл бұрын
I felt like elon musk was teaching me c#. Lmao Thanks for the video , was very helpful & informative.
@RodCast2012
@RodCast2012 5 жыл бұрын
You are the Master! Thanks for your very valuable help!
@bigdog3386
@bigdog3386 5 жыл бұрын
Dear Teacher! :) Could you please talk about what namespace is? How to work with GUI? How can we work with different files for a software, and how make them communicate to each other, like in PHP "class extends blabla"? Please!
@vegetatutorials6144
@vegetatutorials6144 5 жыл бұрын
Thank You so much, very useful, looking forward to th next one.
@mohammedahlam-v8f
@mohammedahlam-v8f 6 ай бұрын
superb explain ......................................! ☺😍
@senayfekadu6859
@senayfekadu6859 5 жыл бұрын
when is the next episode coming out ? and how do we transform to the intermediate level ? with all the graphical design and creating an executable stand alone application
@gaymerjerry
@gaymerjerry 2 жыл бұрын
I say a good way to describe a struct is when you make a class abunch of memory is allocated all over the place for different parts of the class and you dont know where in memory each variable is compared to eachother meanwhile a struct like this would see the 3 elements 2 strings and an int (well it would actually be 2 character pointers and an int but I wont boggle down the details here) and make sure they are in the same order in allocated memory so if you have the memory address of the first character pointer that points to the first string and move 8 bytes forward you know you are at the memory address of the second character pointer that points to the second string. This makes structs a lot better to manipulate but they should only be used when you have a small amount of variables that should be next to eachother in memory If none of that makes sense to you it doesnt matter for C# its more a carry over from being a C based language this stuff matters a lot more in C++ and C when you have total control over the memory
@mmaranta785
@mmaranta785 2 жыл бұрын
I like your teaching style
@hrithikgeorge4571
@hrithikgeorge4571 5 жыл бұрын
So helpful! Thank you very much!
@waleedbensumaidea3947
@waleedbensumaidea3947 Жыл бұрын
Thank you so much, you'r amazing doing this
@Chhattralorenbun
@Chhattralorenbun 5 жыл бұрын
thank you mmtuts you video it is really really understand with your explain and special you show the code step by step with a example also
@BlackAsLight448
@BlackAsLight448 4 жыл бұрын
You look like a young Elon Musk.
@adzharkahar
@adzharkahar 3 жыл бұрын
he kind of sounds like elon
@turbdonkey
@turbdonkey Жыл бұрын
"Person" is a small thing?! Kidding, thanks for the great info.
@Maccelerate
@Maccelerate 5 жыл бұрын
Awesome video!
@yangwendi
@yangwendi 2 жыл бұрын
Thank you for the awesome video.
@douglasposho9299
@douglasposho9299 3 жыл бұрын
keep up the good Work!!
@joepsales3376
@joepsales3376 4 жыл бұрын
11:22 "Juice!"
@LuciSheppy
@LuciSheppy 3 жыл бұрын
That is the most happy "Juice" I've ever heard
@henrychen540
@henrychen540 4 жыл бұрын
Also question: Why use enums if you can use a readonly array. Isn't that like the same thing except with the array you can specify the data type?
@nlogozzo
@nlogozzo 5 жыл бұрын
Can you talk about async programming?
@Case-A-Lace
@Case-A-Lace 2 жыл бұрын
Thanks for this!
@ТимофейМахотин
@ТимофейМахотин 7 ай бұрын
I don't know who you're. I don't understand programming at all, but I love you
@grenskrenofficial7846
@grenskrenofficial7846 3 жыл бұрын
You didn't mention this, the Enum.TryParse(string, out) when it sends 0 yes the number 0, or false, to the out variable if it is deemed false,, so you will just send the enum with the value 0 or the value 0 itself to the out variable. Idk if this is correct, i didnt read the Enum documentation
@nlogozzo
@nlogozzo 5 жыл бұрын
Can you go over interfaces in c#?
@Observ8or
@Observ8or 4 жыл бұрын
Dude you literally saved me
@nelsoneregil4219
@nelsoneregil4219 5 жыл бұрын
cool presentation..love it
@nancyb1252
@nancyb1252 4 жыл бұрын
Good Video well done.
@travelubs
@travelubs 4 жыл бұрын
So helpful, thanks..
@timsem2624
@timsem2624 4 жыл бұрын
Thank you. I like you make performance, while you coding and then turn to the camera(spectrs), it's look like some educational tv show. About enums, its still the most confusing thing for me. Eng is not my native.
@clo2club873
@clo2club873 3 жыл бұрын
what if i want to search in the entire enum for what strings it has and also know what integer its attached? like a foreach loop
@trustingod0
@trustingod0 2 жыл бұрын
If i had a long connection string and i didnt want to always have to write it out could i use an enum ?
@eaglezepplin
@eaglezepplin 3 жыл бұрын
Great Video. I have to know what you said at 8:44 though lol. I listened to it like 5 times and can't make sense of it. Sounds like some random dialect slipped through.
@katherine2209
@katherine2209 Жыл бұрын
"so if we were to hover on top of var"
@verydifferentthought
@verydifferentthought 5 жыл бұрын
Brother this is the end of tutorial or there will be another episode ? I will wait ur answer, thank u beforehand !
@redrey3339
@redrey3339 5 жыл бұрын
mmtuts is having some tech issues so it'll be awhile until he replaces his equip
@verydifferentthought
@verydifferentthought 5 жыл бұрын
@@redrey3339 ok
@zeuz3961
@zeuz3961 4 жыл бұрын
Thanks for the cursus dude. One more question! are you Elon musk twin brother? cause every time i see your video i ask myself where did i see you before!!
@Codality
@Codality 3 жыл бұрын
thx a lot
@nlogozzo
@nlogozzo 5 жыл бұрын
Can you do a c++ series?
@Dani_Krossing
@Dani_Krossing 5 жыл бұрын
I'm not planning a C++ course atm. It might be a future thing.
@nlogozzo
@nlogozzo 5 жыл бұрын
@@Dani_Krossing I would like to learn c++ as I already know Java & python and I think you are a great teacher
@Dani_Krossing
@Dani_Krossing 5 жыл бұрын
@@nlogozzo If you follow this C# course you will notice that C++ is an easier version of C# :) just a recommendation. It is why I decided to learn C# a few years back.
@nlogozzo
@nlogozzo 5 жыл бұрын
@@Dani_Krossing I originally was learning c# about 4 years ago however then I switched to Linux and the c# support then wasn't good so I switched to java cause it was most similar and then I learned java. From there I went to python then c++. I like to stick to cross platform languages and c# was really made for windows
@zaidsaiyed6076
@zaidsaiyed6076 5 жыл бұрын
Hey , I'm from India and i like ur tutorials specially css, js, jquery...can you please make tutorials on bootstrap?
@henrik3098
@henrik3098 2 жыл бұрын
great
@sudharsann6784
@sudharsann6784 2 жыл бұрын
Can we add a space in enum?
@skintaker1949
@skintaker1949 4 жыл бұрын
what is the difference between Casting and Parsing?
@mmaranta785
@mmaranta785 2 жыл бұрын
Casting changes the data type. Parsing works on the data
@projectfednigeria
@projectfednigeria 3 жыл бұрын
Talk about enums begins 3:23
@ashutoshsingh5568
@ashutoshsingh5568 3 жыл бұрын
Wow, I m excited to learn c# from Elon musk. 😁
@Dazza_Doo
@Dazza_Doo 2 жыл бұрын
I came here for help with a programming book - I'm blown-away. If you had a tip jar, I would send you something :D
@kimcorson4458
@kimcorson4458 3 жыл бұрын
why is it that every time this guy looks at the camera I think for a split second: Elon Mu- oh... I could have sworn...
@abdiazizalinor473
@abdiazizalinor473 4 жыл бұрын
where is link mi dear teacher
@abdiazizalinor473
@abdiazizalinor473 4 жыл бұрын
where is discription
@justsomenamelesssoul8097
@justsomenamelesssoul8097 3 жыл бұрын
Elon Musk teaching C# on youtube
@H2R_sahil
@H2R_sahil 2 жыл бұрын
elon musk ?
@_savage
@_savage 3 жыл бұрын
Dude, can you type a lil bit faster?
@Dani_Krossing
@Dani_Krossing 3 жыл бұрын
Nope ^^
@codingwitheric6774
@codingwitheric6774 3 жыл бұрын
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GreatVideo { class Program { static void Main(string[] args) { string message = "great Video!"; bool videoWasAlsome = true; if (videoWasAlsome) { Console.WriteLine(message); } else { Console.WriteLine("This Video sucked"); } } } }
@guyonlead
@guyonlead 4 жыл бұрын
The 1% that uses Structs for editing Binary files...
@JohnK68
@JohnK68 Жыл бұрын
Not well explained.
@user-fw3wl6rv1v
@user-fw3wl6rv1v Жыл бұрын
Enum does not contain a definition for TryParse! how do I define it?
@SweepAndZone
@SweepAndZone 7 ай бұрын
software elon musk
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 5 МЛН
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 35 МЛН
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 31 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 26 МЛН
C# Enums for beginners
8:34
tutorialsEU - C#
Рет қаралды 9 М.
Master C# Interfaces in 12 Minutes - Beginner Tutorial
11:37
tutorialsEU - C#
Рет қаралды 22 М.
C# enums 🪐
7:07
Bro Code
Рет қаралды 71 М.
What are Value Types and Reference Types in C#? (Class vs Struct)
10:55
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 817 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 159 М.
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 137 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 5 МЛН