Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Opens the specified file.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaration
Public Sub OpenDocument ( _
path As String _
)
public void OpenDocument(
string path
)
public:
void OpenDocument(
String^ path
)
member OpenDocument :
path:string -> unit
public function OpenDocument(
path : String
)
Parameters
path
Type: System.String[in] The specified file to open.
Remarks
A language service typically does not need to open a source file so this method is seldom used. However, you can call this method to open a source file if your language service requires that functionality. Visual Studio normally loads a source file then instantiates your language service as needed.
The base method loads the specified source file using the current project.
.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.