Chapter 5 - Debugging, Monitoring, and Testing
In Visual Studio 2017, what is the difference between pressing F5, Ctrl + F5, Shift + F5, and Ctrl + Shift + F5?
F5 saves, compiles, runs, and attaches the debugger, Ctrl + F5 saves, compiles, and runs the debugger, Shift + F5 stops the debugger, and Ctrl + Shift + F5 restarts the debugger.
What information can you find out about a process?
The
Process
class has many properties including:ExitCode
,ExitTime
,Id
,MachineName
,PagedMemorySize64
,ProcessorAffinity
,StandardInput
,StandardOutput
,StartTime
,Threads
,TotalProcessorTime
, and so on. 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?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 http://www.codeproject.com/Articles/61964/Performance-Tests-Precise-Run-Time-Measurements-wi
How do you reference another project in a
.csproj
file?<ItemGroup> <ProjectReference Include="..\Ch05_Calculator\Ch05_Calculator.csproj" /> </ItemGroup>
When writing a unit test, what are the three As?
Arrange, Act, Assert.
What dotnet command executes xUnit test?
dotnet test