AllTheTimeWorld.com

csharp stringsString Length

String Length

Length gives the number of ALL characters in the String

String Length

Length gives the number of ALL characters in the String

length

Length gives the number of characters in the String, including spaces, punctuation, and any other characters.

private void btnOK_Click(object sender, EventArgs e)
{
   String s = txtInput.Text;
   lblOutput.Text = "Length="+s.Length;
}

Ready?

Ready?