共用方式為


End (Visual Basic)

更新:2007 年 11 月

後面接著其他關鍵字時,會結束該關鍵字所引入的陳述式 (Statement) 區塊定義。

 End AddHandler End Class  End Enum  End Event  End Function  End Get  End If  End Interface  End Module  End Namespace  End Operator  End Property  End RaiseEvent End RemoveHandler End Select  End Set  End Structure  End Sub  End SyncLock  End Try  End While  End With

參數

備註

在沒有其他關鍵字的情況下,End 陳述式會立即結束執行。

前面加上數字正負號 (#) 時,End 關鍵字會結束對應指示詞所引入的前置處理區塊。

  • #End
    必要項。結束前置處理區塊的定義。

  • #ExternalSource
    必要項。結束由相符 #ExternalSource 指示詞所開始的外部來源區塊。

  • #If
    必要項。結束由相符 #If 指示詞所開始的條件式編譯 (Compilation) 區塊。請參閱 #If...Then...#Else 指示詞

  • #Region
    必要項。結束由相符 #Region 指示詞所開始的來源區域區塊。

智慧型裝置開發人員注意事項

在沒有其他關鍵字的情況下,不支援 End 陳述式。

請參閱

參考

End 陳述式