System.Configuration.SettingsProviderCollection 类

方法描述

表示应用程序设置提供程序的集合。

语法定义(C# System.Configuration.SettingsProviderCollection 类 的用法)

public class SettingsProviderCollection : ProviderCollection

构造函数

构造函数名称 构造函数描述
SettingsProviderCollection 初始化 SettingsProviderCollection 类的新实例。

成员/方法

方法名称 方法描述
Add 将新设置提供程序添加到集合中。 (重写 ProviderCollection.Add(ProviderBase)。)
Clear 从集合中移除所有项。 (继承自 ProviderCollection。)
CopyTo 从指定索引处开始,将集合中的内容复制到给定数组。 (继承自 ProviderCollection。)
Equals(Object) 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
GetEnumerator 返回一个对象,该对象实现 IEnumerator 接口以循环访问集合。 (继承自 ProviderCollection。)
GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
GetType 获取当前实例的 Type。 (继承自 Object。)
MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
Remove 从集合中移除提供程序。 (继承自 ProviderCollection。)
SetReadOnly 将集合设置为只读。 (继承自 ProviderCollection。)
ToString 返回表示当前对象的字符串。 (继承自 Object。)

提示和注释

SettingsProviderCollection 类是 ProviderCollection 类的直接扩展,用于提供 SettingsProvider 对象的存储。

ApplicationSettingsBase 类使用此集合,以通过 SettingsProviderAttribute 来管理与其每个应用程序设置属性关联的设置提供程序。

System.Configuration.SettingsProviderCollection 类例子


继承层次结构

System.Object

System.Configuration.Provider.ProviderCollection

System.Configuration.SettingsProviderCollection

System.Web.Profile.ProfileProviderCollection

命名空间

namespace: System.Configuration

程序集: System(在 System.dll 中)

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

版本信息

.NET Framework 受以下版本支持:4、3.5、3.0、2.0 .NET Framework Client Profile 受以下版本支持:4、3.5 SP1

适用平台

Windows 7, Windows Vista SP1 或更高版本, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008(不支持服务器核心), Windows Server 2008 R2(支持 SP1 或更高版本的服务器核心), Windows Server 2003 SP2 .NET Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。