by gregmac · 3y ago · 0 comments
if (int.TryParse(userInput, out var number))
{
total += number;
}
This is cleaner code compared to try/catch and usually faster (though debatable if it matters) [2].[1] https://learn.microsoft.com/en-us/dotnet/api/system.net.ipad...
No comments yet.