共用方式為


ModuleMetadata.CreateFromFile(String) Method

Definition

Creates metadata module from a file containing a portable executable image.

public:
 static Microsoft::CodeAnalysis::ModuleMetadata ^ CreateFromFile(System::String ^ path);
public static Microsoft.CodeAnalysis.ModuleMetadata CreateFromFile (string path);
static member CreateFromFile : string -> Microsoft.CodeAnalysis.ModuleMetadata
Public Shared Function CreateFromFile (path As String) As ModuleMetadata

Parameters

path
String

File path.

Returns

Exceptions

path is null.

path is invalid.

Error opening file path. See InnerException for details.

File path not found.

Reading from a file path is not supported by the platform.

Remarks

The file might remain mapped (and read-locked) until this object is disposed. The memory map is only created for large files. Small files are read into memory.

Applies to