JohnathonH
New member
- Joined
- Jun 9, 2006
- Messages
- 1
- Programming Experience
- 3-5
Currently my code looks like this
The problem lies that Console.write(textToWrite) does not function properly and I dont understand what I am doing incorrectly.
I do not want my application to auto launch a dos box, but i do want it to redirect the output if it was launched from a dos box.
Any insight would be helpful.
Thanks
Johnathon H.
VB.NET:
Module main[INDENT]Dim LOGFILE As String = ".\Logfile.log"
Dim objLogfileOutput As New System.IO.StreamWriter(LOGFILE, True)
[/INDENT][INDENT] Sub main()[INDENT]sendToLog("Write this to debug, the log file, and console")
[/INDENT]End Sub
Function sendToLog(ByVal textToWrite As String) As String[INDENT]Debug.WriteLine(textToWrite)
objLogfileOutput.WriteLine(textToWrite)
Console.Write(textToWrite)
Return ""
[/INDENT]End Function
[/INDENT]End Module
I do not want my application to auto launch a dos box, but i do want it to redirect the output if it was launched from a dos box.
Any insight would be helpful.
Thanks
Johnathon H.