Source.UncommentLines(TextSpan, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
删除给定范围内每行开头的行注释字符。
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, System::String ^ lineComment);
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, Platform::String ^ lineComment);
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentLines(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, std::wstring const & lineComment);
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan UncommentLines (Microsoft.VisualStudio.TextManager.Interop.TextSpan span, string lineComment);
abstract member UncommentLines : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.UncommentLines : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function UncommentLines (span As TextSpan, lineComment As String) As TextSpan
参数
- lineComment
- String
开始行注释的字符。
返回
TextSpan删除行注释字符后描述范围的新对象。
注解
从跨度中每行的开头删除前导行注释字符。
基方法检查跨度中的每一行,并从行的开头删除第一组行注释字符,并跳过搜索中的任何前导空格。 如果跨距的范围为零,则仅检查指定为起始行的行。
此方法通常从方法中调用 UncommentSpan 。