Can I get the name with which I have instantiated an object and save it in a string?
float[] objeto1 = new float[4];
float[] objeto2 = new float[5];
new Vectores().MejoresAlumnos(objeto1 , objeto2);
class Vectores
{
public string MejoresAlumnos(float[] notas1, float[] notas2)
{
this.notas1 = notas1;
this.notas2 = notas2;
return notas1.Length > notas2.Length ? notas1.ToString() : notas2.ToString();
}
}
Evidently with the .toString()
it is not possible to do it but ... Is there any way to get it?
I would like to be able to receive the name of the parameter that happened to the MejoresAlumnos
method, that is, in this simple example I would like to receive a string
with the value of objeto2