0

What is the use of return ?,in c#

17th Aug 2017, 1:19 PM
M Arun Kumar
M Arun Kumar - avatar
2 Respostas
+ 1
all functions have a return type. If you called a function add, that takes two numbers and adds them, how do you know the product? You return. ex: int add(int x, int y) { return x + y} int sum = add(5, 7); //sum = 12
17th Aug 2017, 1:50 PM
Jordan Chapman
Jordan Chapman - avatar
0
thank you very much
19th Aug 2017, 3:20 AM
M Arun Kumar
M Arun Kumar - avatar