ProfilePropertySettingsCollection 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
包含一组 ProfilePropertySettingsCollection 对象。
public ref class ProfilePropertySettingsCollection : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))]
public class ProfilePropertySettingsCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))>]
type ProfilePropertySettingsCollection = class
inherit ConfigurationElementCollection
Public Class ProfilePropertySettingsCollection
Inherits ConfigurationElementCollection
- 继承
- 派生
- 属性
示例
下面的代码示例演示如何使用 PropertySettings 属性,该属性是 类的 ProfilePropertySettingsCollection 实例。 此代码示例是为 ProfileSection 类提供的一个更大示例的一部分。
// Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:");
int PGSCtr = 0;
foreach (ProfileGroupSettings propGroups in profileSection.PropertySettings.GroupSettings)
{
Console.WriteLine(" {0}: ProfileGroupSetting '{1}'", ++PGSCtr,
propGroups.Name);
int PPSCtr = 0;
foreach (ProfilePropertySettings props in propGroups.PropertySettings)
{
Console.WriteLine(" {0}: ProfilePropertySetting '{1}'", ++PPSCtr,
props.Name);
}
}
' Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:")
Dim PGSCtr As Integer = 0
For Each propGroups As ProfileGroupSettings In profileSection.PropertySettings.GroupSettings
Console.WriteLine(" {0}: ProfileGroupSettings '{1}'", ++PGSCtr, _
propGroups.Name)
Dim PPSCtr As Integer = 0
For Each props As ProfilePropertySettings In propGroups.PropertySettings
Console.WriteLine(" {0}: ProfilePropertySetting '{1}'", ++PPSCtr, _
props.Name)
Next
Next
注解
profile配置文件的 节指定用户配置文件的架构。 在运行时,ASP.NET 编译系统使用 节中指定的 profile 信息生成一个名为 ProfileCommon的类,该类派生自 ProfileBase。 类ProfileCommon定义基于配置文件 部分的 子节profile中properties定义的属性。 为每个用户配置文件创建此类的实例,可以通过 属性访问代码 Profile 中的单个配置文件值。 有关配置文件属性的详细信息,请参阅 ASP.NET 配置文件属性概述。 有关添加到 ASP.NET 2.0 的配置文件功能的详细信息,请参阅 ASP.NET 配置文件属性概述。
构造函数
| ProfilePropertySettingsCollection() |
创建 ProfilePropertySettingsCollection 类的新实例。 |
属性
方法
显式接口实现
| ICollection.CopyTo(Array, Int32) |
将 ConfigurationElementCollection 复制到数组。 (继承自 ConfigurationElementCollection) |
扩展方法
| Cast<TResult>(IEnumerable) |
将 IEnumerable 的元素强制转换为指定的类型。 |
| OfType<TResult>(IEnumerable) |
根据指定类型筛选 IEnumerable 的元素。 |
| AsParallel(IEnumerable) |
启用查询的并行化。 |
| AsQueryable(IEnumerable) |
将 IEnumerable 转换为 IQueryable。 |