In Java, I want to do something like this: 在Java中,我想作這樣的事情: this
try { ... } catch (/* code to catch IllegalArgumentException, SecurityException, IllegalAccessException, and NoSuchFieldException at the same time */) { someCode(); }
...instead of: ...代替: spa
try { ... } catch (IllegalArgumentException e) { someCode(); } catch (SecurityException e) { someCode(); } catch (IllegalAccessException e) { someCode(); } catch (NoSuchFieldException e) { someCode(); }
Is there any way to do this? 有沒有辦法作到這一點? .net