overwrite contents of file

Hi,

I have the following code:

Dim htmlfile As System.IO.StreamWriter = New System.IO.StreamWriter(newstr)


What I want to do is:

if newstr exists, overwrite its contents.
how can i implement this as the above code does not do this.

thanks.

Comments

  • : Hi,
    :
    : I have the following code:
    :
    : Dim htmlfile As System.IO.StreamWriter = New System.IO.StreamWriter(newstr)
    :
    :
    : What I want to do is:
    :
    : if newstr exists, overwrite its contents.
    : how can i implement this as the above code does not do this.
    :
    : thanks.
    :

    I believe that is the default behavior.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion