No. Very much not. DotNET stream writers are far more flexible and
easy to use.
Also, you can use them to write binary data instead of text based
data. There are even specialized writers for XML formatted data.

But if possible I try not to bother with readers or writers when I can
get away with the IO.File shared functions.

--
David Rutten
da...@mcneel.com
Robert McNeel & Associates




On Mar 26, 7:05 pm, WT4 <william...@hotmail.com> wrote:
> Hi David
>
> Is the Stream/File writer object similar to that used in Rhinosript?
>
> Regards
> William
>
> On Mar 26, 4:55 pm, David Rutten <da...@mcneel.com> wrote:
>
> > Hi WT,
>
> > the easiest way would be to use:
>
> > IO.File.WriteAllLines()
> > IO.File.WriteAllText()
>
> > You can of course also create a Stream/File Writer object and write
> > the numbers one by one, but it will require more code.
> > Basic example (didn't test this):
>
> > Dim lines As New List(Of String)
> > For Each pt As On3dPoint in pts
> >   If (pt Is Nothing) Then
> >     lines.Add("null point")
> >   Else
> >     lines.Add(String.Format("point ({0}; {1}; {2})", pt.x, pt.y,
> > pt.z))
> >   End If
> > Next
> > IO.File.WriteAllLines(file_path, lines.ToArray())
>
> > --
> > David Rutten
> > da...@mcneel.com
> > Robert McNeel & Associates
>
> > On Mar 26, 5:22 pm, WT4 <william...@hotmail.com> wrote:
>
> > > does anyone have an example of a code that writes x,y,z data into a
> > > file within the VB.NET component.  I have seen examples of reading
> > > from a text file but not writing out.
>
> > > Many thanks- Hide quoted text -
>
> > - Show quoted text -

Reply via email to