Skip to content

Instantly share code, notes, and snippets.

@indare
Created March 8, 2012 12:23
Show Gist options
  • Save indare/2000769 to your computer and use it in GitHub Desktop.
Save indare/2000769 to your computer and use it in GitHub Desktop.
i wan't kill returnCode
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