zoukankan      html  css  js  c++  java
  • VB.NET异常迭代捕捉代码示例

     所有编程语言在实际开发中都会出现一些异常,编程人员在代码编写时也会考虑到这些异常的出现做出相应的处理。在VB.NET里,同样需要进行一些异常处理。我们在这里就先为大家介绍一下VB.NET异常迭代捕捉的相关方法。
        VB.NET异常迭代捕捉代码示例:
        Dim a As Integer = 10
        Dim b As Integer = 20
        Dim c As Integer = 10
        Dim i As Integer
        Dim liu As Integer
        Dim aaa As New System.
        Text.StringBuilder
        Try  For i = 0 To 20
        If b < 10 Then aa = a + 1
        Try
        liu = (b / (a - c))
        aaa.AppendLine("ok:" & b.ToString)
        Exit For
        Catch ex As Exception
        aaa.AppendLine("error:" & b.ToString)
        bb = b - 1
        If b < 15 Then  Throw New Exception("error")
        End If
        End Try
        Next
        Me.TextBox1.Text = aaa.ToString
        Catch ex As Exception  MsgBox("oooo")
        End Try
        MsgBox(b.ToString)
        MsgBox("www")
        VB.NET异常迭代捕捉的相关代码编写方法就为大家介绍到这里。

  • 相关阅读:
    NTP服务器搭建
    Linux安装MongoDB 4.4.2
    CentOS安装Zookeeper 3.6.2
    CentOS安装Redis 6.0.9
    MacBook Home End
    SLES Install
    cucumber soapui test web services
    S/4 HANA Solution Manager
    Linux下创建新用户
    su with hyphen and without
  • 原文地址:https://www.cnblogs.com/fukajg/p/2671275.html
Copyright © 2011-2022 走看看