C# Custom Methods with Multiple Parameters Example
C# custom methods with multiple parameters are very helpful. You can pass different kind of data type variables to get the desired output. A custom method in C# can have parameters in the form of integer, string, float, custom class, custom structure, custom interface etc. The C# custom methods with multiple parameters example is given below, where we are passing a string as well as integer data type to call our custom method.
static void Main(string args)
string total = "The total is ";
int count = 10;
public static void PrintMessage(string total, int count)
Console.WriteLine(total + count);
The total is 10
Press any key to continue . . .