ITextBufferFactoryService::CreateTextBuffer Method (String^, IContentType^)
Visual Studio 2015
Creates an ITextBuffer with the specified IContentType and populates it with the given text.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
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. |
Show: