Source.UncommentBlock(TextSpan, String, String) 方法

定义

从指定范围中删除注释字符。

public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, System::String ^ blockStart, System::String ^ blockEnd);
public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, Platform::String ^ blockStart, Platform::String ^ blockEnd);
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, std::wstring const & blockStart, std::wstring const & blockEnd);
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan UncommentBlock (Microsoft.VisualStudio.TextManager.Interop.TextSpan span, string blockStart, string blockEnd);
abstract member UncommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.UncommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function UncommentBlock (span As TextSpan, blockStart As String, blockEnd As String) As TextSpan

参数

span
TextSpan

TextSpan描述要取消注释的跨度的对象。

blockStart
String

一个字符串,其中包含用于启动块注释的字符。

blockEnd
String

保存结束块注释的字符的字符串。

返回

TextSpan

TextSpan删除注释字符后描述范围的新对象。

注解

此方法从给定范围中删除开始和结束注释标记。

基方法要求跨度中的第一个字符是开始块注释字符串和跨度中的最后一个字符作为结束块注释字符串。 仅当找到并删除了开始块注释字符串时,才会搜索和删除结束块注释字符串。 如果跨距的范围为零,则仅检查指定为起始行的行。

此方法通常从方法中调用 UncommentSpan

适用于