Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // awkward way
- catch(Exception ex){
- if (ex is RudenSpecificException)
- {
- ((RudenSpecificException) ex).RudenMessage;
- }
- }
- // fast way
- catch(Exception ex)
- {
- var rudenSpecific = ex as RudenSpecificException;
- if (rudenSpecific != null) rudenSpecific.Message; // not a big win in lines in this case, but you can use fields directly via one AS command
- }
Advertisement
Add Comment
Please, Sign In to add comment