Cordial greeting.
I am a student of development, I am developing a program and in a class I have a method with several parameters, the question that arises is that within the method as I should treat those parameters, should I assign them to a local variable? or I can work on those objects without needing to assign them to a local variable. Example: I have the following method.
public void CambiarTextoTextBox(TextBox textBoxAModificar)
{
TextBox textBox=textBoxAModificar;
textBox.ForeColor = Color.Black;
textBox.Text="Hola";
}
public void CambiarTextoTextBox(TextBox textBoxAModificar)
{
textBoxAModificar.ForeColor = Color.Black;
textBoxAModificar.Text="Hola";
}
I clarify that I know that the two methods work correctly, my doubt is that which is the correct one, which would be a good practice.