ITextBufferFactoryService::CreateTextBuffer Method (String^, IContentType^)

 

Creates an ITextBuffer with the specified IContentType and populates it with the given text.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

ITextBuffer^ CreateTextBuffer(
	String^ text,
	IContentType^ contentType
)

Parameters

text
Type: System::String^

The initial text to add.

contentType
Type: Microsoft.VisualStudio.Utilities::IContentType^

The IContentType for the new ITextBuffer.

Return Value

Type: Microsoft.VisualStudio.Text::ITextBuffer^

A ITextBuffer object with the given text and IContentType.

Exception Condition
ArgumentNullException

Either text or contentType is null.

Return to top
Show: