Possible Duplicate:
Null out parameters in C#?
In some cases while calling a certain method I am not interested in all values in the method signature. Then I use either default or null values for them.
But in case of out
or ref
references in method signature I always have to define a dummy variable that I pass to this method:
public static bool IsNumber(this Token token)
{
int tmp = 0;
return Int32.TryParse(token.Data,out tmp);
}
So, my question is whether I can somehow eliminate this varibale (it is assigned by never read!) and still correctly call the method requiring an out
parameter?