Access of Shared member...

M

mr t

I create a process p like this:

dim p as new System.Diagnostics.Process()

the reason I am doing this, is to be able to read the Output and Error
streams like this:

p.StandardOutput.ReadToEnd()

now, I .net 2.0, I get a warning when I try to go...
p.Start(FileName)

Access of shared member.... qualifying expression will not be
evaluated.

OK, now, start is a shared member, so, I need to access it using
System.Diagnostics.Process.Start(FileName)

but, how do I get the StandardOutput for this process? especially when
different process will be running at the same time?

thanks for everybody's help. T
 
A

Armin Zingler

mr t said:
I create a process p like this:

dim p as new System.Diagnostics.Process()

the reason I am doing this, is to be able to read the Output and
Error streams like this:

p.StandardOutput.ReadToEnd()

now, I .net 2.0, I get a warning when I try to go...
p.Start(FileName)

p.StartInfo.FileName = Filename
p.Start()

Access of shared member.... qualifying expression will not be
evaluated.

OK, now, start is a shared member,

Not the overloaded version without an argument.
so, I need to access it using
System.Diagnostics.Process.Start(FileName)

but, how do I get the StandardOutput for this process?

p = System.Diagnostics.Process.Start(FileName)
p.StandardOutput.....

especially
when different process will be running at the same time?



Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top