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
2.1m questions
2.1m answers
60 comments
57.0k users