+4  A: 

Had you actually started the process when the debugger picture was taken? That's the screenshot I'd expect to see before the Start() method is called.

Note that the common pattern is to create a ProcessStartInfo, populate it, and then call the static Process.Start(startInfo) method. That makes it conceptually simpler: you don't see the Process object until it's been started.

Jon Skeet
Thanks Jon, I have tested after process started, the values are becoming valid. I am confused why before process start the values are displayed as InvalidOperationException? It is for what purpose (why not have a default value to display)?
George2
Because the getter is throwing an exception. It makes sense if you think about it; those properties will not be valid until the process has started or exited.
Ed Swangren
They should definitely *not* return default values. If they did, one might assume that those values had been correctly returned from an actual process. What you're doing is the equivalent of asking a null reference for its length as a string... it doesn't have one, it isn't a string! Similarly you don't *have* a process to ask for its handle count etc. The exception is telling you you're *doing something wrong*: namely fetching properties before starting the process. That can never be a useful thing to do, and the exception is a much better indicator of that than default values would be.
Jon Skeet
Hi Ed, for properties like basepriority, should be of some default value and it is just an int, why debugger cannot display the default value and why it reports InvalidOperationException?
George2
Thanks Joe, your reply makes senses.
George2
+3  A: 

Most of the properties become available after IExplore process start

ArsenMkrt
So, you think it is expected?
George2
Hi ArsenMkrt, I have tested after process started, the values are becoming valid. I am confused why before process start the values are displayed as InvalidOperationException? It is for what purpose (why not have a default value to display)?
George2
Because that properties are not have meanings before process start, what should be Handler property of the process if the process is not started? Or how to know is there error or not to fill error properties before process started?
ArsenMkrt
Thanks ArsenMkrt, your reply makes senses.
George2
+1  A: 

Yes, this is expected behavior and it is clearly documented in MSDN as well.

For example, Process.BasePriority Property can throw an InvalidOperationException exception when the process has exited or the process has not started (see more details in MSDN).

Chansik Im
Thanks Chansik, your reply makes senses!
George2
+1  A: 

Many of the properties are marked with InvalidOperationException because until you start the process . The object 'myProcess' is not associated with any running process and hence it cannot get the information.

Try adding these statements, after the code to start the process

if (myProcess != null)
{

myProcess.WaitForExit();

//or any other statements for that matter

}

Now, when you are inside the if statement, the VSTS debugger will be able to show most of the properties associated with the object myProcess. This happens because, myProcess object is now associated with a running process "IExplore.exe".

Pradeepneo
Cool, thanks Pradeepneo!
George2