Static Class Attributes | C# | Tutorial 29

  Рет қаралды 37,991

Giraffe Academy

Giraffe Academy

6 жыл бұрын

Source Code - www.giraffeacademy.com/program... This video is one in a series of videos where we'll be looking at programming in C#. The course is designed for new programmers, and will introduce common programming topics using the C# language.
Throughout the course we'll be looking at various topics including variables, arrays, getting user input, loops, conditionals, object orientation and much more.

Пікірлер: 31
@chris8534
@chris8534 2 жыл бұрын
I like how you recreate the class every video to be different - it's really re-enforcing how the concept works.
@alexpopowski1318
@alexpopowski1318 Жыл бұрын
You helped me have a breakthrough. I’ve been struggling to wrap my head around static for a while. Thanks so much!
@nikolastevkovski818
@nikolastevkovski818 3 жыл бұрын
This tutorials are really awesome, you should make one for stack/heap; reference types/value types recursion etc...
@babakasheri6379
@babakasheri6379 2 жыл бұрын
Your tutorials make me more productive, thanks bro
@101Jman
@101Jman 3 жыл бұрын
Nice clear explanation. Cheers
@christopherromano3210
@christopherromano3210 3 жыл бұрын
Mike, these videos are incredibly clear and helpful. Any chance you could add a few more Unity-minded C# examples? Like Coroutines and Events? And grabbing and sharing values between scripts?
@halooshka1904
@halooshka1904 6 жыл бұрын
I actually understood what's going on?! Thank you so much for this!
@TheAmazeer
@TheAmazeer 4 жыл бұрын
Thanks dude it's crystal clear
@qianbang_
@qianbang_ 6 жыл бұрын
Love how you explain things very deep and thoroughly
@fatherdome5457
@fatherdome5457 10 ай бұрын
Hey Mike. I really enjoy your videos regarding c#. Thanks for explaining it so well. It is very helpfull for me also just listening to your explanations while i’m walking my dog. That tends to bring me faster to the “ooooohhhhhh” moment😊. Well of course it might take at least some pre knowledge about termilogy and functions, but it is fun to experience that light-bulb moment. Only draw is that i don’t keep an eye of my dog finding and eating stuff, not suitable for dogs😊…..
@kolawoleadekunle5364
@kolawoleadekunle5364 5 жыл бұрын
Many thanks Mike... Pls can you do a video on concepts of OOP with explanations for modeling Aggregation, Composition et.c using C# ?
@ab-yp2gn
@ab-yp2gn 2 жыл бұрын
Thanks!!! this was great :-)
@user-pc7px7em5z
@user-pc7px7em5z Жыл бұрын
תודהה סרטון מעולה!!!!!!!!!!!1
@bakkalimourad7977
@bakkalimourad7977 3 жыл бұрын
thanks
@tsareena5899
@tsareena5899 4 жыл бұрын
A solution I tried messing with: In the program class: //[STATIC CLASS ATTRIBUTES]// Song holiday = new Song("Holiday", "Green Day", 200); Song kashmir = new Song("Kashmir", "Led Zeppelin", 150); Song lala = new Song("fdsafas", "fdsafsdn", 800); //This should directly be at the end of that object. If in accordance with his tutorial. // However, how do we really get the student count? Console.WriteLine(Song.songCount); Console.WriteLine(holiday.getSongCount()); Console.WriteLine(kashmir.getSongCount()); Console.WriteLine(lala.getSongCount()); Console.ReadLine(); In the song class: public string title; public string artist; public int duration; public static int songCount = 0; public int count; public Song(string aTitle, string aArtist, int aDuration) { title = aTitle; artist = aArtist; duration = aDuration; count = songCount++; } public int getSongCount() { return count + 1; }
@davimuna1434
@davimuna1434 3 жыл бұрын
Please help us do oop 4 pillers in c# i love your explanation
@ntatall762
@ntatall762 Жыл бұрын
please explain copy constructor in simple and easy step, and explain how it work and where i can use it
@amyyang2181
@amyyang2181 Жыл бұрын
thank you, explain clear and easy to understand
@jannickbreunis
@jannickbreunis 4 жыл бұрын
Great explanation, again. Question, why do you prefix an a to your parameters? Is that for a reason or just because a is the first letter of the alphabet. And, wouldn't it be better if you'd use this.title = title; in the constructor?
@tsareena5899
@tsareena5899 4 жыл бұрын
He said before in his past C# tutorials. 'a' is just a notation for an argument but you can really name it any.
@milesblack1830
@milesblack1830 2 жыл бұрын
its because in a constructor it won't let you use the same name for the variable being assigned and the paramater. So you can't do: public Song(string title) { title = title } Instead you have to name the parameter something else.
@firey7710
@firey7710 2 күн бұрын
@@milesblack1830 i know 2 years late but cant u just do this.title = title?
@Gorlykio2k34
@Gorlykio2k34 5 жыл бұрын
wtf? why are you calling "Properties", Attributes?
@jonathaningersoll6213
@jonathaningersoll6213 3 жыл бұрын
They're not even properties - they're fields!
@giacomorinaldi
@giacomorinaldi Жыл бұрын
hello. you dont need to write public static int GetSongCount ?
@IvanYorgov
@IvanYorgov 5 жыл бұрын
Felds are not attributes, nor properties
@cheshire9646
@cheshire9646 3 жыл бұрын
These are fields, attributes are something else. you explain things well but it's a shame you didn't check that you are you using the right terms.
@milesblack1830
@milesblack1830 2 жыл бұрын
fields == attributes....
@upcom1ng116
@upcom1ng116 2 жыл бұрын
It's not hard for you check other term neither.
@greg5326
@greg5326 2 жыл бұрын
I literally skipped 80% of this video and understand the concept completely. Static means it spans the entire class. Great. Why do you describe every single line of code?
@alanmoreno6330
@alanmoreno6330 Жыл бұрын
Because ur mom
Static Methods & Classes | C# | Tutorial 30
6:29
Giraffe Academy
Рет қаралды 93 М.
Getters & Setters | C# | Tutorial 28
12:09
Giraffe Academy
Рет қаралды 191 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 1,6 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,8 МЛН
Exception Handling | C# | Tutorial 24
11:01
Giraffe Academy
Рет қаралды 87 М.
Inserting Documents | MongoDB | Tutorial 5
13:35
Giraffe Academy
Рет қаралды 56 М.
If Statements | C# | Tutorial 14
15:51
Giraffe Academy
Рет қаралды 25 М.
Constructors | C# | Tutorial 26
10:29
Giraffe Academy
Рет қаралды 85 М.
Methods | C# | Tutorial 12
11:00
Giraffe Academy
Рет қаралды 55 М.
Variables | C# | Tutorial 4
13:03
Giraffe Academy
Рет қаралды 27 М.
C# constructors 👷
5:44
Bro Code
Рет қаралды 75 М.
While Loops | C# | Tutorial 18
9:10
Giraffe Academy
Рет қаралды 45 М.
For Loops | C# | Tutorial 20
10:16
Giraffe Academy
Рет қаралды 36 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 1,6 МЛН