You cannot do this, but there's no rule saying that you have to use the value that comes back. You can simply pass a temporary variable that you never use again.
C# 4.0 allows optional parameters, but out
parameters can't be optional.
EDIT: BTW, you can also overload the method:
int DoStuff()
{
int temp;
return DoStuff(out temp);
}
int DoStuff(out outParam)
{
//...
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…