C# Tutorials
C# Tutorials
C# Tutorials
Methods
[static] <return_type> <method_name>([<param_list>])
Example:
static void Main(string[] args)
Modifiers:
public static void PrintLogo()
{
Console.WriteLine("Microsoft");
Console.WriteLine("www.microsoft.com");
}
Public is an access modifier.
Invoking a Method :
PrintLogo();
Returns:
static long Multiply(int number1, int number2)
{
long result = number1 * number2;
return result;
}