- Which information can you find out about a process?
Answer: The Process
class has many properties including: ExitCode
, ExitTime
, Id
, MachineName
, PagedMemorySize64
, ProcessorAffinity
, StandardInput
, StandardOutput
, StartTime
, Threads
, and TotalProcessorTime
. You can find more information about Process Properties at: https://msdn.microsoft.com/en-us/library/System.Diagnostics.Process_properties(v=vs.110).aspx
- How accurate is the
Stopwatch
class?
Answer: The Stopwatch
class can be accurate to within a nanosecond (a billionth of a second), but you shouldn't rely on that. You can improve accuracy by setting processor affinity, as shown in the article at the following link:http://www.codeproject.com/Articles/61964/Performance-Tests-Precise-Run-Time-Measurements-wi
- By convention, what suffix should be applied to a method that returns
Task
orTask<T>
?
Answer: Add the suffix Async
to the method name, for example, OpenAsync
for...