diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs index 171342cfd6..9f8ceca69c 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs @@ -287,7 +287,7 @@ namespace ICSharpCode.TextEditor.Actions } string comment = null; - if (textArea.Document.HighlightingStrategy.Properties["LineComment"] != null) { + if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("LineComment")) { comment = textArea.Document.HighlightingStrategy.Properties["LineComment"].ToString(); }