Source::CommentBlock Method (TextSpan, String^, String^)

 

Comments out a span of source using block comments.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual TextSpan CommentBlock(
	TextSpan span,
	String^ blockStart,
	String^ blockEnd
)

Parameters

span
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

A TextSpan object describing the span of source to put into a block comment.

blockStart
Type: System::String^

A string that specifies the block comment start character or characters.

blockEnd
Type: System::String^

A string that specifies the block comment end character or characters.

Return Value

Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

A TextSpan object encompassing the entire commented block, including the added comment start and end strings.

This method surrounds the specified span with the specified block comment strings.

The base method comments out the specified span and returns a new span that includes the added comment block delimiters. This method is typically called from the CommentSpan method. If the span's extent is zero, then only the first line specified in span is commented out after skipping any leading whitespace on the line.

Return to top
Show: