[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

stringbuilder : can i determine last line, go to the last line, and delete the last line if it is blank?

Posted on 2004-11-29
2
Medium Priority
?
1,466 Views
Last Modified: 2006-11-17
hi, im doing a really horrible report here, and it uses a stringbuilder which appends lines constantly.
but im having problems because a last line is generated , which results in a new page which is then blank.
e.g. an actual 5 page report then goes to 6 pages, the 6th page being blank.
could i move to the last line in a stringbuilder, and then delete it?
i know of sb.remove(startindex,length) , but i cant move to the specified line
google searches have not been helpful)
0
Comment
Question by:jxharding
2 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 200 total points
ID: 12703698
Hi jxharding, do you know what is in that last line,

because maybe you can just do

sb.remove(sb.length-1,1)
0
 

Author Comment

by:jxharding
ID: 12703867
brilliant, thanks!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question