Troubleshoot and Debug Flashcards

1
Q

Contract.requires(…)

A

specifices a precondition that must be met before the method is allowed to be called

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Contract.Ensures( …, “…”)

A

specifies a post-condition that is evaluated after a method is invoked.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Debug.Assert(…)

A

will display a message box if condition is not met but does not escape the method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Trace.Assert(…, “…”

A

writes to the trace log if condition is not met)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly