U
USCG
My mini-application pings various machines and writes the
result to a text file.
There is a cosmetic quirk I am troubled with though.
When I look at the text file output, at the end of each
line there is a strange character that looks like a
musical note. Should I be concerned about this? Here is
my code for reference.
Imports System.IO
Module Module1
Sub Main()
Dim fs As New FileStream("Results.txt",
FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
s.BaseStream.Seek(0, SeekOrigin.End)
Dim pr As New System.Diagnostics.Process
pr.StartInfo.CreateNoWindow = True
pr.StartInfo.FileName = "ping.exe"
pr.StartInfo.Arguments = "-w 1 10.33.36.5"
pr.StartInfo.RedirectStandardOutput = True
pr.StartInfo.RedirectStandardError = False
pr.StartInfo.UseShellExecute = False
pr.Start()
Dim strOut As String = pr.StandardOutput.ReadToEnd
()
pr.WaitForExit()
s.WriteLine(strOut)
s.Close()
End Sub
End Module
result to a text file.
There is a cosmetic quirk I am troubled with though.
When I look at the text file output, at the end of each
line there is a strange character that looks like a
musical note. Should I be concerned about this? Here is
my code for reference.
Imports System.IO
Module Module1
Sub Main()
Dim fs As New FileStream("Results.txt",
FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
s.BaseStream.Seek(0, SeekOrigin.End)
Dim pr As New System.Diagnostics.Process
pr.StartInfo.CreateNoWindow = True
pr.StartInfo.FileName = "ping.exe"
pr.StartInfo.Arguments = "-w 1 10.33.36.5"
pr.StartInfo.RedirectStandardOutput = True
pr.StartInfo.RedirectStandardError = False
pr.StartInfo.UseShellExecute = False
pr.Start()
Dim strOut As String = pr.StandardOutput.ReadToEnd
()
pr.WaitForExit()
s.WriteLine(strOut)
s.Close()
End Sub
End Module