Partilhar via


ITextBuffer.ChangeContentType(IContentType, Object) Method

Definition

Changes the IContentType for this ITextBuffer.

public:
 void ChangeContentType(Microsoft::VisualStudio::Utilities::IContentType ^ newContentType, System::Object ^ editTag);
public:
 void ChangeContentType(Microsoft::VisualStudio::Utilities::IContentType ^ newContentType, Platform::Object ^ editTag);
void ChangeContentType(Microsoft::VisualStudio::Utilities::IContentType const & newContentType, winrt::Windows::Foundation::IInspectable const & editTag);
public void ChangeContentType (Microsoft.VisualStudio.Utilities.IContentType newContentType, object editTag);
abstract member ChangeContentType : Microsoft.VisualStudio.Utilities.IContentType * obj -> unit
Public Sub ChangeContentType (newContentType As IContentType, editTag As Object)

Parameters

newContentType
IContentType

The new IContentType.

editTag
Object

An arbitrary object that will be associated with this edit transaction.

Exceptions

newContentType is null.

Another ITextBufferEdit object is active for this ITextBuffer, or CheckEditAccess() would return false.

Applies to