ExpansionFunction.GetSelection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取当前视图中选定文本的跨度。
public:
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
public:
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
public Microsoft.VisualStudio.TextManager.Interop.TextSpan GetSelection ();
member this.GetSelection : unit -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Function GetSelection () As TextSpan
返回
TextSpan包含所选文本跨度的对象。
注解
此帮助器方法对 GetSelection IVsTextView 对象中包含的对象调用方法 ExpansionProvider 。 如果该 ExpansionProvider 对象不可用,则返回的 TextSpan 对象的所有字段都设置为0。