Check out example codes for "c# function return". It will help you in understanding the concepts better.

Code Example 1

// To create a function with a return value, note the variable
// type in front of the function name and add a return of the
// same type at the end.
static string lastFirst(string firstName, string lastName)
{
	string separator = ", ";
	string result = lastName + separator + firstName;
	return result;
}

Learn ReactJs, React Native from akashmittal.com