Source.CommentLines(TextSpan, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called from Comment Selection. Default behavior is to insert line style comments at beginning and end of selection. Override to add custome behavior.
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, System::String ^ lineComment);
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, Platform::String ^ lineComment);
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, std::wstring const & lineComment);
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan CommentLines (Microsoft.VisualStudio.TextManager.Interop.TextSpan span, string lineComment);
abstract member CommentLines : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.CommentLines : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function CommentLines (span As TextSpan, lineComment As String) As TextSpan
Parameters
- span
- TextSpan
- lineComment
- String
Returns
The final span of the commented lines including the comment delimiters
Remarks
Prefaces all lines in span
with the line comment string.
The base method skips leading whitespace on each line before inserting the line comment string. This method is typically called from the CommentSpan method.