Created
March 8, 2012 12:23
-
-
Save indare/2000769 to your computer and use it in GitHub Desktop.
i wan't kill returnCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class TryCatch | |
Public Function YesError() as hogeEnum | |
Dim i as integer | |
Dim returnCode as integer | |
Dim MessageReturn as Integer = MessageBox.Show("キャンセル?","問い合わせ",MessageBoxButton.YesNo) | |
If MessageReturn = DialogResult.No Then | |
Rerun hogeEnum.Cancel | |
Exit Function | |
End If | |
Try | |
i = "hoge" | |
returnCode = hogeEnum.Done | |
Catch ex as Exception | |
returnCode = hogeEnum.Fail | |
Finally | |
'なんかの処理 | |
End Try | |
return returnCode | |
End Function | |
End Class | |
Public Enum hogeEnum as integer | |
Cancel | |
Done | |
Fail | |
End Enum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment