How to create text document in vb.net

To create text document
---------------------------------------------------------------------------------------
Private Sub Btcreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btcreate.Click
Try

IO.File.WriteAllText("C:/anuraj.txt", "ANURAJ S")
MessageBox.Show("text document created")

Catch ex As Exception

End Try

End Sub
---------------------------------------------------------------------------------------

No comments: