Devuelve el primer y el último parámetro
Escribe dos funciones que acepten cualquier cantidad de argumentos:
FirstArg()devuelve el primer argumento.LastArg()devuelve el último argumento.
Devuelve null cuando no se proporciona ningún argumento.
Ejemplos
Program.FirstArg(1, 2, 3) ➞ 1
Program.LastArg(1, 2, 3) ➞ 3
Program.FirstArg(8) ➞ 8
Program.LastArg(8) ➞ 8Notas
La palabra clave params permite que un método de C# acepte una cantidad variable de argumentos.