Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Syntax
'Declaration
Function CreateTextBuffer ( _
text As String, _
contentType As IContentType _
) As ITextBuffer
ITextBuffer CreateTextBuffer(
string text,
IContentType contentType
)
ITextBuffer^ CreateTextBuffer(
String^ text,
IContentType^ contentType
)
abstract CreateTextBuffer :
text:string *
contentType:IContentType -> ITextBuffer
function CreateTextBuffer(
text : String,
contentType : IContentType
) : ITextBuffer
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Either text or contentType is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.