A new feature in C# 6.0 allows to declare variable inside TryParse method.
I have some code:
string s = "Hello";
if (int.TryParse(s, out var result))
{
}
But I receive compile errors:
What I am doing wrong?
P.S.: in project settings C# 6.0 and .NET framework 4.6 are set.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…