VB.Net/Development/Assert

Материал из VB Эксперт
Версия от 15:45, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Debug Assert Demo

<source lang="vbnet"> Imports System Imports System.Diagnostics Public Class MainClass

   Shared Sub Main()
       Dim NumEmployees As Integer = 0
       Debug.Assert(NumEmployees > 0, _
           "NumEmployees must be greater than zero", _
           "The program cannot generate timesheets if no employees are defined.")
       
   End Sub

End Class


      </source>