Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
Need help with the stringbuilder class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="bchekuri, post: 146638, member: 39566"] Hi, I need help understanding the usage of the stringbuilder class. The scenario is: i have a form set up with 2 richtextbox controls. I would like to paste lets say 40000 values in richtextbox 1 and click a button that adds a predefined string to these values and they would finally display in richtextbox2. But my code below doesn't really seem to work. It takes about an hour to perform this operation. Please help! Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim x As Long Dim Mystring As New System.Text.StringBuilder() For x = RichTextBox1.Lines.GetLowerBound(0) To RichTextBox1.Lines.GetUpperBound(0) array1(x) = Mystring.Append("INSERT INTO #TMP (TMP) Values ('") array1(x) = Mystring.Append(RichTextBox1.Lines(x)) array1(x) = Mystring.Append("')") RichTextBox2.Text = array1(x).ToString() & vbCrLf Next End Sub End Class Thanks, Bharath [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
Need help with the stringbuilder class
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom