c# convert string to value code example Example 1: string to int c# int x = Int32.Parse("1234"); Example 2: c# string to int int result = Int32.Parse(input);