0

I have an array of process I need to print starttime of all processes. I can access to starttime of some of processes and when trying another ones it gives error "access denied" and throws exception

process[i].StartTime

How can I define without exception, that I don't have access to certain property of certain process. Thanks.

Sorry, It does not solve my problem. I don't need to access the property of process, I just need to know without exception if it can be accessed. I need to be able to write something like this:

if(process.canaccess("propertyname")) 
{ do something}
Vasiliy
  • 151
  • 1
  • 8
  • 2
    Duplicate of http://stackoverflow.com/questions/28708/process-starttime-access-denied – Alireza Nov 12 '15 at 09:53
  • Sorry, It does not solve my problem. I don't need to access the property of process, I just need to know without exception if it can be accessed. – Vasiliy Nov 12 '15 at 10:08
  • can you pleas try enclosing the piece of code having startTime with try catch and then accordingly keep your logic ? – kishore V M Nov 12 '15 at 10:18
  • It is rather slow solution if I need to apply it to a number of processes. – Vasiliy Nov 12 '15 at 10:41

0 Answers0