简体   繁体   中英

What does this number colon [5:] statement mean in VB.NET?

I'm looking at some VB.NET code that's been ported from VB6, and I saw this method.

    Private Sub txtDefaultSlope_TextChanged(sender As Object, e As EventArgs) Handles txtDefaultSlope.TextChanged
        Dim temp = Me.txtDefaultSlope.Text
        Dim slope As Double
5:
        If (Double.TryParse(temp, slope)) Then
           ...
        End If

    End Sub

What does the 5: statement mean in line 4 of the method?

It is just a Label. From the code it appears that it is not used anywhere, usually it can be used with a GoTo statement.

You should see: How to: Label Statements (Visual Basic)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM