using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // return = returns data back to the place where a method is invoked double x; double y; double result; Console.WriteLine("Enter in number 1: "); x = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter in number 2: "); y = Convert.ToDouble(Console.ReadLine()); result = Multiply(x, y); Console.WriteLine(result); Console.ReadKey(); } static double Multiply(double x, double y) { return x * y; } } }
@yusupadilson92313 жыл бұрын
You know men, it's amazing... I am from Russia, i understand you better than from Russian KZbin channels, although i don't know English well...🤣
@Omar555-o0o Жыл бұрын
Iam from Egypt as well
@selvakumar-91 Жыл бұрын
Hi yusupadilson
@michaeljoshsarmiento61583 жыл бұрын
string comment = "This is a random comment"; Console.WriteLine(comment); Console.ReadLine();
@yosefabramov8592 Жыл бұрын
You are a legend! Clear, comprehensive and to the point!
@siddharthjain66296 күн бұрын
What a wonderful video. We want tutors like you bro
@apertaplays11 ай бұрын
Sir, i have a question that nobody answered me so i could finally umderstand. Why return needs to be used? I mean, it makes no sense to me.
@seidkadi3 ай бұрын
same problem
@jguillermooliverАй бұрын
You need return to retorno data from the function to the place you call it from so that you can use that data to do something. You don't need retorn if you're only going to write or show a message on the console.
@costi2m2 жыл бұрын
Thanks bro, you're a life saver!
@homayoun_hu7720Ай бұрын
thank u very much for the simple explanation!
@michabakiewicz37715 ай бұрын
Very helpful video, Bro. Thanks!
@daviceconelo52752 жыл бұрын
Great short video, I finally understood the return thingy
@vaynore8672 жыл бұрын
Amazing, thank you, Chad
@gamersresidence60409 ай бұрын
random comment: "The dog has no nose." "How did it smell?" "Terrible."
@spartanranger3 жыл бұрын
Thanks for the video Bro.
@AndiMSF2 жыл бұрын
Thank you so much sirr !
@Ryöken176 ай бұрын
double and float.... are they the same ?
@dontboyr8 ай бұрын
Wiat so if you returned x instead of z would result = x?
@tselhamishac59109 ай бұрын
I'm trying use a method to change variables outside the method, and I have no idea why it's not working
@khaledwaleed4456 ай бұрын
bro code helpd mein python and c++ and now c# but the reutn method i understand now but when to use it?