c# string try parse int code example
Example 1: c# tryparse int
bool success = Int32.TryParse(value, out number);
if (success)
{
Console.WriteLine("Converted '{0}' to {1}.", value, number);
}
Example 2: parse int in c#
int x = Int32.Parse(TextBoxD1.Text);