G
Guest
I have to read data from an external source, massage the data, concatenate it
to one long string, then write it to a textfile. So I am experimenting with
the StringBuilder object. I append the data in a loop, then I write the data
to text file, then I need to clear the StringBuilder object for the next row
of data. First, is this the proper use of the StringBuilder object? Second,
I am clearing the object using the Remove method starting at point 0 and
StringBuilderObject.Length. Is this correct for clearing the object?
Imports System.Text
....
Dim strData As New StringBuilder
....
strData.Append ....
....
strDate.Remove(0, strData.Length)
Thanks,
Rich
to one long string, then write it to a textfile. So I am experimenting with
the StringBuilder object. I append the data in a loop, then I write the data
to text file, then I need to clear the StringBuilder object for the next row
of data. First, is this the proper use of the StringBuilder object? Second,
I am clearing the object using the Remove method starting at point 0 and
StringBuilderObject.Length. Is this correct for clearing the object?
Imports System.Text
....
Dim strData As New StringBuilder
....
strData.Append ....
....
strDate.Remove(0, strData.Length)
Thanks,
Rich