how to check if an int is a string in C#? code example Example: c# see if string is int bool result = int.TryParse("123", out var n);