VB.Net Tutorial/Statements/Resume — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 15:54, 26 мая 2010

Resume

<source lang="vbnet">Module Module1

   Sub Main()
       On Error GoTo Handler
       Dim i1 As Integer = 0
       Dim i2 As Integer = 128
       Dim intResult As Integer
       intResult = i2 / i1
       Console.WriteLine("Press Enter to continue...")
       Console.ReadLine()
       Exit Sub

Handler:

       Console.WriteLine("An overflow error occurred.")
       Resume Next
   End Sub

End Module</source>

An overflow error occurred.
Press Enter to continue...