Out variables


C# 7.0 – Discards

Sometimes there is a need to ignore a result of a method. It’s straightforward if that’s a return value – just don’t assign it. But what should be done in other cases?


C# 7.0 – Out variables 1

Using out parameters was always a bit painful. The biggest drawback is the need to declare variables before they can be used.