Does C# support compiling filters? How do filters even work or what do they do?
Like reflector decompiles a filter as
try { } catch(Exception e) when (?) { }
Since C# 6 you can now do this.
try { … } catch (MyException e) when (myfilter(e)) { … }
This is different from using an if statement from within the catch block, using exception filters will not unwind the stack.
if
catch
1.4m articles
1.4m replys
5 comments
57.0k users