閱讀英文

共用方式為


IResourceReader 介面

定義

提供從資源檔讀取資料的基本功能。

C#
public interface IResourceReader : IDisposable, System.Collections.IEnumerable
C#
[System.Runtime.InteropServices.ComVisible(true)]
public interface IResourceReader : IDisposable, System.Collections.IEnumerable
衍生
屬性
實作

備註

資源讀取器可用來從特定格式的資源檔讀取數據流。 當您想要控制資源檔案讀取 (的方式時實作這個介面,例如,如果使用自定義 ResourceWriter) 來寫入資源檔,或是您使用非標準格式或檔類型來儲存資源。 否則,請使用預設 ResourceReader 類別,從二進位 .resources 檔案讀取資源資訊,或 ResXResourceReader 從 XML 資源讀取資源資訊的 類別, (.resx) 檔案。

方法

Close()

在釋放與資源讀取器相關的任何資源之後,關閉資源讀取器。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

(繼承來源 IDisposable)
GetEnumerator()

傳回這個讀取器資源的字典列舉程式。

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

適用於

產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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

另請參閱