Printing a parameter name
suggest changeSnippet
public void DoSomething(int paramValue)
{
Console.WriteLine(nameof(paramValue));
}
...
int myValue = 10;
DoSomething(myValue);
Console Output
paramValue
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents