No video

Return Statement | C# | Tutorial 13

  Рет қаралды 58,180

Giraffe Academy

Giraffe Academy

Күн бұрын

Source Code - www.giraffeacad... 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.

Пікірлер: 58
@claudebutnaru3931
@claudebutnaru3931 6 жыл бұрын
Wow this guy has probably the best videos on C# on KZbin. Excellent explanations. His tutorials deserve more views. I don't get KZbin. His videos should be on top. Do more videos on C# Mike.
@ShadesGameSource
@ShadesGameSource 3 жыл бұрын
A few people seem confused in the comments about "where" the value is being returned. I'm also a beginner, but here's my understanding of how this all works: If you pause the video at 4:11, you can see that the cube() method is being called in the Main() method. Console.WriteLine(cube(5));
@petarunx7611
@petarunx7611 2 жыл бұрын
Thank you bro i was wondering what he meant by return to collar to understand that.but you make me understand it all easier anyways
@prashanthmanchikatla5945
@prashanthmanchikatla5945 2 жыл бұрын
So return is same as Console writeline ?
@toppy2300
@toppy2300 2 жыл бұрын
@@prashanthmanchikatla5945 no return and console.writeline have nothing to do with each other. As guy above I’m also beginner but from what I understand return turns the method into a sort of variable. Usually without return the method would just multiply 5 x 5 x 5 and end it there, but with return the value that is calculated is saved onto cube(5); which allows u to print it or whatever else.
@willh69
@willh69 2 жыл бұрын
My understanding is that the value is returned to memory. So it's like you say to someone, can you calculate 3*3*3? (eg the method saying calculate 3*3*3) And they say, "Yep, got it". But they don't tell you. So you have to ask them, "err, you mind telling me what you just calculated? (which in code would be Console.WriteLine(" x " ), code way of saying "TALK TO ME OUT LOUD PLS" They say, "Oh, you never specified that you wanted me to say the result out loud. Ok, well, the result is 27." And then you hit your head against the wall and cry because you ask yourself why you code has to be so specific all the time 😅🥲
@MsCarbonCopy
@MsCarbonCopy Жыл бұрын
Without your C# tutorial, I would not have been able to get through the first part of my online course! ***** I FINISHED THE FIRST PART***** THANK YOU!!!
@PsychicSploob
@PsychicSploob 3 жыл бұрын
You speak to your audience like you would if you were speaking to other human beings! Such a rare trait in the coding world lol
@monkeyrobotsinc.9875
@monkeyrobotsinc.9875 4 жыл бұрын
You smart cool teacher. Not slow annoying burnout like all the rest.
@Cary581
@Cary581 4 жыл бұрын
Thank you for this! Explained so clearly
@MessingWithCode
@MessingWithCode 2 жыл бұрын
Greattings from Dominican Republic !!!! , Your video was very simple , very quick , very clear , thanks a lot.
@HasithGunathilake
@HasithGunathilake 5 жыл бұрын
Explanations are crystal clear. Best c# tutorial series.
@andrevj6644
@andrevj6644 2 жыл бұрын
saving the return was making my confused before but now Im happy. thanks
@joshuatownsend8241
@joshuatownsend8241 4 жыл бұрын
Thank you so much. I suspected this was the purpose of returns (besides just exiting methods) for so long but I've felt like no one else could explain to me how they practically work in simple and human terms. Imma subscribe!
@brianmjacobsen
@brianmjacobsen 3 жыл бұрын
Hey Mike! How about sharing some of your awesomeness in Algorithms? Paid, unpaid I am just loving your ways of putting this in context, in depth how it works and how to use it. Thanks again!
@itech40
@itech40 5 жыл бұрын
Keep it up! Thanks. I saw you first on FCC!
@gamingarchive8435
@gamingarchive8435 3 жыл бұрын
Awesome explanation man. Clear and precise. Thanks a lot.
@ethaan5707
@ethaan5707 Жыл бұрын
You are the one my friend
@cheneddie8185
@cheneddie8185 2 жыл бұрын
very helpful and clear
@daverich3352
@daverich3352 4 жыл бұрын
Thanks for explaining that to me, it makes more sense now. I have a comment on the recording of yourself on camera. This may not make any sense but something I observe. Since the camera is close to you the perspective in the recording of yourself is obvious and at odds with perspective I have when viewing the PC screen. It would look better if the camera was further away, you can then zoom in which will flatten the perspective view of yourself. I think it would make the video look better. Just thought I'd mention it.
@giuseppesalvo5755
@giuseppesalvo5755 2 жыл бұрын
Amazing explanation! Thank you 🙌
@devmaster7587
@devmaster7587 3 жыл бұрын
all the respect for the work you are doing, just you should explain to the new programmers that return type should match return type of function, back in the day when i was new no one did properly explained it to me and it was kind of black box for me :P
@chris8534
@chris8534 3 жыл бұрын
You are smashing it.
@user-js5ry9ls9v
@user-js5ry9ls9v Жыл бұрын
why did teach the method before if statement?
@pop2497
@pop2497 3 жыл бұрын
really good tutorials you have!
@somyamishra7730
@somyamishra7730 Жыл бұрын
Hi Mike, just a question ,we have this main method and it also has a parameter of type array so what does it do?
@kabukijoe99
@kabukijoe99 2 жыл бұрын
good lesson
@raphaelotojareri1326
@raphaelotojareri1326 3 жыл бұрын
Mike thanks a lot you're the 🐐🐐
@MsCarbonCopy
@MsCarbonCopy Жыл бұрын
Thank you
@Jay-og4yb
@Jay-og4yb 3 жыл бұрын
Oh I get it Int num is the number the user puts in in this case you wanted to use '5' Then you pass it through an algorithm You set the result of that algorithm to a new variable and then return that variable. Which means that you are replacing num with your new variable. Ie Num = 5 Int result = num * 2 Return result; Num now equals result
@archstanton9182
@archstanton9182 4 жыл бұрын
Video was very good, but I would have added that a method should only return at the end of the method or function. If someone has returns at a half a dozen different places in the method, (I have maintained code like that), it becomes difficult to understand what is going on if you didn't write the code. It is better to restructure the code so the return only occurs at the end of the function or method.
@aliezzaym1735
@aliezzaym1735 3 жыл бұрын
thank you man i needed that
@ITYWTD_
@ITYWTD_ 3 ай бұрын
Does anyone know how to store a return value to a variable? Never mind figured it out lol
@my_studies2888
@my_studies2888 5 жыл бұрын
Thank you for videos mike! I downloaded a lot of your videos from freecodecamp, if you don’t mind could I ask you some Qs somewhere ?
@yazuki1185
@yazuki1185 3 жыл бұрын
who is the caller
@Joyosagsm
@Joyosagsm 4 жыл бұрын
So why only use Static when creating a method?
@thatego9417
@thatego9417 2 жыл бұрын
Can you return multiple data types in one method??
@my_studies2888
@my_studies2888 5 жыл бұрын
So it always returning something to the USER ?
@munyamunya313
@munyamunya313 4 жыл бұрын
thats my question too im so lost
@timoneri8812
@timoneri8812 2 жыл бұрын
i return to you a 👍 thank you ! :)
@matthewel-sirafy7266
@matthewel-sirafy7266 5 жыл бұрын
your great, thank you so much
@TheRouqs
@TheRouqs 4 жыл бұрын
How to return 2 values ?
@terezaprochazkova352
@terezaprochazkova352 4 жыл бұрын
Hi Mike ! Thanks for these vidoes,do you also work in WPF ? I need some help :)
@munyamunya313
@munyamunya313 4 жыл бұрын
im lost where is it returning the value
@thepr1ntgnome430
@thepr1ntgnome430 2 жыл бұрын
Return keyword does not work
@holovosty
@holovosty 3 жыл бұрын
THNX
@Darkaz77
@Darkaz77 5 жыл бұрын
so in other words return is the same as a Console.WriteLine(); ???
@danielabrenes327
@danielabrenes327 5 жыл бұрын
No, return is used inside a method so when you call it, it gives back a certain value. But the value is just obtained, you aren't showing it on the console. That's why then you use Console.WriteLine(), to display the value.
@Darkaz77
@Darkaz77 5 жыл бұрын
@@danielabrenes327 I understand, thank you
@my_studies2888
@my_studies2888 4 жыл бұрын
Daniela Brenes you’re the First to explain it in laymen terms, THANK YOU❤️
@jasondotjson34
@jasondotjson34 4 жыл бұрын
Thanks! ;)
@khojiakbarkhonisakov7785
@khojiakbarkhonisakov7785 4 жыл бұрын
Cool
@Moccalocca100
@Moccalocca100 Жыл бұрын
Your explaination is good but i notice sometimes you have spaghetti code.
@corn_enthusiast
@corn_enthusiast 4 жыл бұрын
240 likes, 0 dislikes that's an achievement
@LeonGrayJ
@LeonGrayJ 4 жыл бұрын
but the achievement is gone now
@unknownfactor6489
@unknownfactor6489 3 жыл бұрын
Hmmmmmm
If Statements | C# | Tutorial 14
15:51
Giraffe Academy
Рет қаралды 25 М.
Constructors | C# | Tutorial 26
10:29
Giraffe Academy
Рет қаралды 86 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 2,4 МЛН
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 84 МЛН
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 3,9 МЛН
This Dumbbell Is Impossible To Lift!
01:00
Stokes Twins
Рет қаралды 35 МЛН
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 120 М.
Coding SUCKS for Beginners | Let's Rant!
17:40
Giraffe Academy
Рет қаралды 161 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
do you know how "return" works under the hood? (are you SURE?)
5:08
Low Level Learning
Рет қаралды 353 М.
Methods | C# | Tutorial 12
11:00
Giraffe Academy
Рет қаралды 56 М.
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 405 М.
If Statements (con't) | C# | Tutorial 15
9:04
Giraffe Academy
Рет қаралды 14 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 795 М.
Ditch your Favorite Programming Paradigm
6:08
Code Persist
Рет қаралды 179 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 2,4 МЛН