G
Guest
This is a very basic question about programming convention and best
practice.
Methods often take parameters, and in C# the datatypes and parameter names
are declared in the method signature:
public void CreateNewsletter (int pubVol, int pubNo, string title, DateTime
pubDate)
Should these parameters subsequently be assigned to differently-named
variables in the body of the method, or should they be used directly
as-named in the method signature?
Is there a consensus on this point? It seems like re-assigning them might
be more "tidy," at the cost of more chance of breakage if names are changed
later.
-KF
practice.
Methods often take parameters, and in C# the datatypes and parameter names
are declared in the method signature:
public void CreateNewsletter (int pubVol, int pubNo, string title, DateTime
pubDate)
Should these parameters subsequently be assigned to differently-named
variables in the body of the method, or should they be used directly
as-named in the method signature?
Is there a consensus on this point? It seems like re-assigning them might
be more "tidy," at the cost of more chance of breakage if names are changed
later.
-KF