Declaring a method with multiple signatures is called method overloading. Each signature must have different parameters, or the method definition will result in an error.
The appropriate signature is executed based on the arguments used when calling the method.
// Signature 1.
public void SetName(string name)
{
_name = name;
}
// Signature 2.
public void SetName(string first, string last)
{
_name = $"{first} {last}";
}
// Signature 3.
public void SetName(string first, string middle, string last)
{
_name = $"{first} {middle} {last}";
}