TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Glenn Patton
NA
308
82.8k
Simplest way of adding a ',' to each line of a rich text box
Mar 6 2012 9:40 AM
Hi All,
In finishing off a bit of test code I'm doing I have some results shoved to a rich text box. I am trying to add a ',' to the end of each line I am doing the following
StreamWriter sw = new StreamWriter(filePutter.FileName);
sw.WriteLine("Pitstop 2.0 Transparent Data " + DateTime.Now.ToString() + " Serial Number:" + txtSerialNumberRead.Text + ",");
sw.Write(rtbTransparentLog.Text);
this while it saves the data does not give what I need i.e.:
data,
it gives
,data
The rtbox is updated with
rtbTransparentLog.Text +=","+ myComPort.ReadLine();
by placing the comma after rtbTransparentLog.Text +=myComPort.ReadLine()+",";
means the same still happens due to the line feed stuck on the end. Any quickways if getting it in there?
Glenn
Reply
Answers (
2
)
How to check which toolbarmenuitem is clicked from another windows form
Get full path file from Share Add-in Word