Is there a way to omit out parameter? [duplicate]
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; … Read more