I am trying to write to a .txt file here is my code:

VB Code:
  1. Dim oFile As System.IO.File
  2.         Dim oWrite As System.IO.StreamWriter
  3.         oWrite = oFile.CreateText("C:\New.txt")
  4.         oWrite.WriteLine("This is just a test.")
  5.         oWrite.WriteLine()

The code will create a new txt file, but it will not write the text to the file.

thanks