다음을 통해 공유


Source.CommentLines(TextSpan, String) Method

Definition

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.

Applies to