ITextDocumentFactoryService::CreateAndLoadTextDocument Method (String^, IContentType^)

 

Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer.

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

ITextDocument^ CreateAndLoadTextDocument(
	String^ filePath,
	IContentType^ contentType
)

Parameters

filePath
Type: System::String^

The full path to the file to be loaded.

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

The IContentType for the ITextBuffer.

Exception Condition
ArgumentNullException

filePath or contentType is null.

This method is equivalent to CreateAndLoadTextDocument(filePath, contentType, true).

Return to top
Show: