How to use string Length() in C#

Length()  – The string Length method used to calculate the character length of string.

Length method returns the integer value in result.

 

How to use Length() string method in C#

How to use Length() string method in C#

 

write c# code on button click events :

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = “Length = ” +TextBox1.Text.Length.ToString();
}

 

How to use Length() string method in C#

How to use Length() string method in C#

 

How to use Length() string method in C#

How to use Length() string method in C#

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 4 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">