I was reading about new out variable features in C#7 here. I have two questions:
It says
We allow \"discards\" as out parameters as w
Regarding the first question
I guess this is just an info and not a new feature of C#7 because we can do so in pre C#7.0 too.
var _; if (Int.TryParse(str, out _)) // ...
The novelty is that you dont have to declare _ anymore inside or outside the expression and you can just type
int.TryParse(s, out _);
Try to do this one liner pre C#7:
private void btnDialogOk_Click_1(object sender, RoutedEventArgs e)
{
DialogResult = int.TryParse(Answer, out _);
}