Assembly.GetFiles Method

Definition

Gets the files in the file table of an assembly manifest.

Overloads

GetFiles()

Gets the files in the file table of an assembly manifest.

GetFiles(Boolean)

Gets the files in the file table of an assembly manifest, specifying whether to include resource modules.

GetFiles()

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Gets the files in the file table of an assembly manifest.

public virtual System.IO.FileStream[] GetFiles ();

Returns

An array of streams that contain the files.

Implements

Exceptions

A file that was found could not be loaded.

A file was not found.

A file was not a valid assembly.

Remarks

This method works on public and private resource files.

This overload is equivalent to calling the GetFiles(Boolean) overload and specifying false.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

GetFiles(Boolean)

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Gets the files in the file table of an assembly manifest, specifying whether to include resource modules.

public virtual System.IO.FileStream[] GetFiles (bool getResourceModules);

Parameters

getResourceModules
Boolean

true to include resource modules; otherwise, false.

Returns

An array of streams that contain the files.

Implements

Exceptions

A file that was found could not be loaded.

A file was not found.

A file was not a valid assembly.

Remarks

This method works on public and private resource files.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1