private static bool IsLineCommentedOrEmpty(ITextSnapshotLine line, CommentSelectionInfo info) { var lineText = line.GetText(); // We don't add / remove anything for empty lines. return(lineText.Trim().StartsWith(info.SingleLineCommentString, StringComparison.Ordinal) || line.IsEmptyOrWhitespace()); }