borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (How to get animating window when copying file)Next Topic (Crystal Reports ) New Topic Post Reply
AndreaVB OnLine : Articles and tutorials : StringBuilder Part 1
Poster Resource
dcostelloe
Level: VB Guru

Registered: 11-06-2002
Posts: 74
icon StringBuilder Part 1

How to Create a StringBuilder Object

Imports System.Text

Dim ObjString As StringBuilder = New StringBuilder()
' Add Some Text

ObjString.Append("Hello World AND ")

MessageBox.Show(ObjString.ToString)

'Ops we made a mistake lets delete the "AND"
objString.ToString.Trim()
objString.Remove(objString.Length - 4, 3)
MessageBox.Show(ObjString.ToString)

' Lets Clear the StringBuilder Object
objString.Remove(0,objString.Length)

Hope this Helps
David..........


[Edited by admin on 02-08-2002 at 01:14 PM GMT]

____________________________
Life is but a merry go round
around and around :-)

Visit us today:
http://www.welford-costelloe.com

02-08-2002 at 12:10 PM
View Profile Send Email to User Show All Posts Visit Homepage | Add Comment
warrenla
Level: Guest

icon Re: StringBuilder Part 1

Here is some complete code...
<script language="vb" runat="server">
Sub Page_Load
Dim MyString As New System.Text.StringBuilder()
MyString.Append("Hello")
MyString.Append(" There.")
Response.Write (MyString.ToString() & "<br />")

Dim StartTime
StartTime = New Date().Now
Response.Write(StartTime)
End Sub
</script>







10-03-2003 at 04:38 PM
| Add Comment
AndreaVB OnLine : Articles and tutorials : StringBuilder Part 1
Previous Topic (How to get animating window when copying file)Next Topic (Crystal Reports )New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder