My application has a textbox in which the user enters "names". I per line.

I wrote some code to get the total count of the "names" and discovered it worked properly.

However if the user accidentally presses enter again after typing in the names it will get an in accurate count because it is counting the enter spaces as a line.

-Is there a way to remove any extra enter spaces at the end of my code
so the count wont be messed up?

-Example?

Thanks