By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,037 Members | 1,839 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,037 IT Pros & Developers. It's quick & easy.

How to count Lines?

Ajay Bhalala
100+
P: 119
Hello experts,

I have 1 form.

In this form there is one textbox named "txtName" and 1 button named"btnCountLines" in the windows form.

I want to know how to check How many lines are entered in the txtName?

I need your help as soon as possible. Thank you in advance for your help.
Jan 16 '15 #1

✓ answered by Frinavale

The TextBox Class has a Lines Property that returns an array of strings that represent the lines in the TextBox. You can then use the array's Length property to see how many lines there are in the TextBox.

Share this Question
Share on Google+
2 Replies


Frinavale
Expert Mod 5K+
P: 9,731
The TextBox Class has a Lines Property that returns an array of strings that represent the lines in the TextBox. You can then use the array's Length property to see how many lines there are in the TextBox.
Jan 16 '15 #2

Ajay Bhalala
100+
P: 119
Thank you so much for your information.

It's really work. and it is very useful for me.

Thank you so much for your help. Thank you very very very much. You are very helpful for me and all. Thank you.
Jan 16 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.