Board index » Visual Studio » Streamwriter

Streamwriter

Visual Studio346
Dim sw As New IO.StreamWriter("File path")

sw.WriteLine ("This is a line of text")

sw.Flush()

sw.Close



I got this sample from Crouchie1998



but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.

would there be a reason for this maybe I'm not using the right libary?


-
 

Re:Streamwriter

Would have thought you'd need vb.net to use it, but perhaps not.



Could try System.IO.StreamWriter



Jon





"Opyuse" <Opyuse@discussions.microsoft.com>wrote in message

Quote
Dim sw As New IO.StreamWriter("File path")

sw.WriteLine ("This is a line of text")

sw.Flush()

sw.Close



I got this sample from Crouchie1998



but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.

would there be a reason for this maybe I'm not using the right libary?





-

Re:Streamwriter

It's in



Mscorlib.dll



Jon





"Jon" <Email_Address@SomewhereOrOther.com>wrote in message

Quote
Would have thought you'd need vb.net to use it, but perhaps not.



Could try System.IO.StreamWriter



Jon





"Opyuse" <Opyuse@discussions.microsoft.com>wrote in message

news:C51ACA11-8A23-429D-9B45-F86FFCACA877@microsoft.com...

>Dim sw As New IO.StreamWriter("File path")

>sw.WriteLine ("This is a line of text")

>sw.Flush()

>sw.Close

>

>I got this sample from Crouchie1998

>

>but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.

>would there be a reason for this maybe I'm not using the right libary?









-

Re:Streamwriter

"Jon" <Email_Address@SomewhereOrOther.com>schrieb:

Quote
Would have thought you'd need vb.net to use it, but perhaps not.



Yes, you need VB.NET.



--

M S Herfried K. Wagner

M V P <URL:dotnet.mvps.org/>">dotnet.mvps.org/>

V B <URL:classicvb.org/petition/>">classicvb.org/petition/>

-

Re:Streamwriter

Ignore that last post





"Jon" <Email_Address@SomewhereOrOther.com>wrote in message

Quote
It's in



Mscorlib.dll



Jon







-

Re:Streamwriter

Cheers afraid of that. just thought it looked better whated to see if I could

use it.



"Herfried K. Wagner [MVP]" wrote:



Quote
"Jon" <Email_Address@SomewhereOrOther.com>schrieb:

>Would have thought you'd need vb.net to use it, but perhaps not.



Yes, you need VB.NET.



--

M S Herfried K. Wagner

M V P <URL:dotnet.mvps.org/>">dotnet.mvps.org/>

V B <URL:classicvb.org/petition/>">classicvb.org/petition/>



-