Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Assertions/C-sharp/assertions-2.cs
Normal file
21
Task/Assertions/C-sharp/assertions-2.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Imports System.Diagnostics
|
||||
' Note: VB Visual Studio projects have System.Diagnostics imported by default,
|
||||
' along with several other namespaces.
|
||||
|
||||
Module Program
|
||||
Sub Main()
|
||||
Dim a As Integer = 0
|
||||
|
||||
Console.WriteLine("Before")
|
||||
|
||||
' Always hit.
|
||||
Trace.Assert(a = 42, "Trace assertion failed: The Answer was incorrect")
|
||||
|
||||
Console.WriteLine("After Trace.Assert")
|
||||
|
||||
' Only hit in debug builds.
|
||||
Debug.Assert(a = 42, "Debug assertion failed: The Answer was incorrect")
|
||||
|
||||
Console.WriteLine("After Debug.Assert")
|
||||
End Sub
|
||||
End Module
|
||||
Loading…
Add table
Add a link
Reference in a new issue