using System;
public class SetDefaultValueToFunctionParameters
{
public static void Main()
{
// Calling the function without passing any arguments
PrintMessage();
// Calling the function with one argument
PrintMessage("C#");
// Calling the function with both arguments
PrintMessage("abc", 3);
}
static void PrintMessage(string message = "Default message", int count = 1) {
for (int i = 0; i < count; i++) {
Console.WriteLine(message);
}
}
}
/*
run:
Default message
C#
abc
abc
abc
*/