diff --git a/docs/csharp/language-reference/keywords/when.md b/docs/csharp/language-reference/keywords/when.md index 4de4d4539ada2..063e8a8f5c29f 100644 --- a/docs/csharp/language-reference/keywords/when.md +++ b/docs/csharp/language-reference/keywords/when.md @@ -20,7 +20,7 @@ You can use the `when` contextual keyword to specify a filter condition in two c Starting with C# 6, `when` can be used in a `catch` statement to specify a condition that must be true for the handler for a specific exception to execute. Its syntax is: ```csharp -catch ExceptionType [e] when (expr) +catch (ExceptionType [e]) when (expr) ``` where *expr* is an expression that evaluates to a Boolean value. If it returns `true`, the exception handler executes; if `false`, it does not.