Name
End... Statement
Syntax
End End Class End Enum End Function End Get End If End Interface End Module End Namespace End Property End Select End Set End Structure End Sub End SyncLock End Try End With End While
Description
Ends a procedure or a block of code
Rules at a Glance
The End
statement is used as follows:
Statement |
Description |
---|---|
End |
Terminates program execution |
End Class |
Marks the end of a class definition |
End Enum |
Marks the end of a series of enumerated constants |
End Function |
Marks the end of a |
End Get |
Marks the end of a Property Get definition |
End If |
Marks the end of an |
End Interface |
Marks the end of an interface definition |
End Module |
Marks the end of a code module |
End Namespace |
Markes the end of a namespace definition |
End Property |
Marks the end of a |
End Select |
Marks the end of a |
End Set |
Marks the end of a Property Set definition |
End Structure |
Ends the definition of a structure or user-defined type |
End Sub |
Marks the end of a Sub procedure |
End SyncLock |
Terminates synchronization code |
End Try |
Marks the end of a |
End With |
Marks the end of a |
End While |
Marks the end of a |
Programming Tips and Gotchas
When used alone, the End
statement wraps calls to the private FileSystem.CloseAllFiles function, as well as to the System.Environment object’s Exit method, making it relatively ...
Get VB.NET Language in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.