I'm working on a little app that requires the results of a dsquery and dsget set in a string for clean up (replacing spaces and other not needed characters). I can display the results of the stream with ReadToEnd - but can't seem to find anything on getting it into a string.
VB.net - visual basic 2010
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim p As New Process
p.StartInfo.UseShellExecute = False
p.StartInfo.CreateNoWindow = True
p.StartInfo.FileName = "program"
p.StartInfo.Arguments = "lots here"
p.StartInfo.RedirectStandardOutput = True
p.Start()
Dim reader As StreamReader = p.StandardOutput
p.WaitForExit()
MsgBox(reader.ReadToEnd)
End Sub
reader.ReadToEnd.