Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- SomeAction();
- }
- catch(Exception _Ex)
- {
- if(_Ex is NullReferenceException)
- {
- DoSomething();
- }
- else if(_Ex is ArgumentOutOfRangeException)
- {
- DoSomethingElse();
- }
- }
- try
- {
- SomeAction();
- }
- catch(NullReferenceException _Ex)
- {
- DoSomething();
- }
- catch(ArgumentOutOfRangeException _Ex)
- {
- DoSomethingElse();
- }
- catch(Exception _Ex)
- {
- if(_Ex is NullReferenceException)
- {
- DoSomething();
- }
- else if(_Ex is ArgumentOutOfRangeException)
- {
- DoSomethingElse();
- }
- throw;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement