473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

inserting a break in a StringBuilder string

I have a string built using the stringbuilder class and I need to insert a
break at the end of the string, how do I do that?

Thanks, Justin.
Nov 19 '05 #1
2 1561
In C# append "\r\n", and in VB append vbCrLf.

"Justin" <Ju****@discussions.microsoft.com> ¦b¶l¥ó
news:71**********************************@microsof t.com ¤¤¼¶¼g...
I have a string built using the stringbuilder class and I need to insert a
break at the end of the string, how do I do that?

Thanks, Justin.

Nov 19 '05 #2
MyStringBuilder.Append("<br>")

or

MyStringBuilder.Append(System.Environment.NewLine)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Justin" <Ju****@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...
I have a string built using the stringbuilder class and I need to insert a
break at the end of the string, how do I do that?

Thanks, Justin.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Alvin Bruney | last post by:
Is string builder intelligent enough to handle concats without behaving like string? Consider myStringBuilder.Append("one" + "two") what does the '+' do here? Because this syntax is also...
6
by: Nurchi BECHED | last post by:
Hello, All! I have created an application with a multiline textbox on the form. When I press a button, it has to show something and then break the line and show something else. I tried "\n",...
9
by: Andrew Banks | last post by:
I'm running the following code in a C#.NET page and it doesn't enter the values into the DB. I'm certain the problem is to do with the txtBirth field. It allows users to enter a DOB as dd/mm/yyyy...
3
by: sklett | last post by:
Hi- I understand that the Page class has methods for inserting client script into the page. I don't want to build my entire client block w/ a StringBuilder because I only need 1 dynamic...
4
by: Cor | last post by:
Hi Newsgroup, I have given an answer in this newsgroup about a "Replace". There came an answer on that I did not understand, so I have done some tests. I got the idea that someone said,...
12
by: Richard Lewis Haggard | last post by:
I thought that the whole point of StringBuilder was that it was supposed to be a faster way of building strings than string. However, I just put together a simple little application to do a...
3
by: rcoco | last post by:
Hi, I want to share this problem. I have a datagrid that will help me Insert data into sql database. So I made a button On my form so that when I press the button a new row on datagrid should be...
1
by: Simon Gare | last post by:
Hi all, have a line of code in a ViewLocation.aspx.cs file below StringBuilder sb = new StringBuilder(); sb.Append("Driver No: ").Append(driver.DriverNo.ToString()).Append("<br>");...
34
by: raylopez99 | last post by:
StringBuilder better and faster than string for adding many strings. Look at the below. It's amazing how much faster StringBuilder is than string. The last loop below is telling: for adding...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.