0

Possible Duplicate:
Finding the Variable Name passed to a Function in C#
get name of a variable or parameter

It's sorta a long explanation, so I'll just dive right into the question:

Is there any way to store the name of the variable used in a parameter to a string?

example:

 void ExampleMethod(int parameter1)
{
Stuff
}

ExampleMethod(VariableInt);

How would I go about getting "VariableInt" into a string variable?

4

0 に答える 0