c# get text characters lenght code example Example: count text length c# int X = textBox1.Text.Length;