how to count textbox characters in c# code example Example: count text length c# int X = textBox1.Text.Length;