更改此 ITextBuffer 的 IContentType。
命名空间: Microsoft.VisualStudio.Text
程序集: Microsoft.VisualStudio.Text.Data(在 Microsoft.VisualStudio.Text.Data.dll 中)
语法
声明
Sub ChangeContentType ( _
newContentType As IContentType, _
editTag As Object _
)
void ChangeContentType(
IContentType newContentType,
Object editTag
)
void ChangeContentType(
IContentType^ newContentType,
Object^ editTag
)
abstract ChangeContentType :
newContentType:IContentType *
editTag:Object -> unit
function ChangeContentType(
newContentType : IContentType,
editTag : Object
)
参数
newContentType
类型:Microsoft.VisualStudio.Utilities.IContentType新的 IContentType。
editTag
类型:Object对象与此编辑事务。
异常
异常 | 条件 |
---|---|
ArgumentNullException | newContentType 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
InvalidOperationException | 另一 ITextBufferEdit 对象用于此 ITextBuffer处于活动状态。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。