473,499 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to clean the content of a strinbuider object

Hello,

I try to delete the content of a StringBuider object.
Is it Remove the only option?

private StringBuider secName = new .....;
......
secName.Remove(0, secName.Length);

Thanks
May 16 '06 #1
4 1305
Hi,

Yes, it's
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Dan Aldean" <da*******@yahoo.com> wrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
Hello,

I try to delete the content of a StringBuider object.
Is it Remove the only option?

private StringBuider secName = new .....;
.....
secName.Remove(0, secName.Length);

Thanks

May 16 '06 #2
thanks
May 16 '06 #3
Actually, that's not true.

A much easier (and cleaner, IMO) way of doing this is just setting the
Length property to 0.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:Os**************@TK2MSFTNGP03.phx.gbl...
Hi,

Yes, it's
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Dan Aldean" <da*******@yahoo.com> wrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
Hello,

I try to delete the content of a StringBuider object.
Is it Remove the only option?

private StringBuider secName = new .....;
.....
secName.Remove(0, secName.Length);

Thanks


May 16 '06 #4
much easier, much better
May 16 '06 #5

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

Similar topics

8
5467
by: Travis Pupkin | last post by:
Hi, I use a WYSIWYG rich text editor on a few web sites for clients to manage their content, but a lot of them use word and paste into the box and end up with a lot of crappy code as a result. ...
0
1546
by: Cindy Mueller | last post by:
--F0.5BD08B6_ABBB95C Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <body> <div align=3D"center"> <center> <table border=3D"0" cellspacing=3D"1" width=3D"100%">...
0
1581
by: Carl Frey | last post by:
--E.3EC5.46C.DE_FF_ Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <body> <div align=3D"center"> <center> <table border=3D"0" cellspacing=3D"1" width=3D"100%">...
1
4092
by: Sharon | last post by:
How do I clean the content of a ListBox control?? -- Thanks Sharon G.
4
1790
by: Rick | last post by:
Hello, Below I create a static instance of an object, works well. public static BasicCounter GlobalCounter = new BasicCounter("GlobalCounter"); private void Page_Load(object sender,...
4
2191
by: darrel | last post by:
I'm backtracking to a problem I had a month or so ago. I need to write XML files quite a bit. I'm finding that the way I'm doing it doesn't write a new, clean XML file each time, but just dumps...
3
8295
by: Nick Gilbert | last post by:
Hi, In my VS.NET 2005, if I choose Build Clean Solution, the BIN folder is not touched. Shouldn't it delete all the dll and pdb files in that folder first? Instead, I'm finding I have to do it...
232
13062
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
25
2977
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.