.NET Framework 类库
SystemWebSectionGroup.RoleManager 属性

注意:此属性在 .NET Framework 2.0 版中是新增的。

获取 roleManager 节。

命名空间:System.Web.Configuration
程序集:System.Web(在 system.web.dll 中)

语法

Visual Basic(声明)
Public ReadOnly Property RoleManager As RoleManagerSection
Visual Basic(用法)
Dim instance As SystemWebSectionGroup
Dim value As RoleManagerSection

value = instance.RoleManager
C#
public RoleManagerSection RoleManager { get; }
C++
public:
property RoleManagerSection^ RoleManager {
    RoleManagerSection^ get ();
}
J#
/** @property */
public RoleManagerSection get_RoleManager ()
JScript
public function get RoleManager () : RoleManagerSection

属性值

RoleManagerSection 对象。
备注

RoleManagerSection 对象引用配置文件的 roleManager 节。

示例

下面的代码示例演示如何从现有 Web 应用程序的配置文件获取 RoleManagerSection 对象。

Visual Basic
' Get the roleManager section.
Dim roleManager _
As RoleManagerSection = _
systemWeb.RoleManager
' Read section information.
info = roleManager.SectionInformation
name = info.SectionName
type = info.Type
declared = info.IsDeclared.ToString()
msg = String.Format("Name:     {0}" + _
ControlChars.Lf + "Declared: {1}" + _
ControlChars.Lf + "Type:     {2}" + _
ControlChars.Lf, name, declared, type)
C#
// Get the roleManager section.
RoleManagerSection roleManager =
    systemWeb.RoleManager;
// Read section information.
info =
    roleManager.SectionInformation;
name = info.SectionName;
type = info.Type;
declared = info.IsDeclared.ToString();
msg = String.Format(
    "Name:     {0}\nDeclared: {1}\nType:     {2}\n",
    name, declared, type);
平台

Windows 98、Windows 2000 SP4、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0
请参见

标记 :


Page view tracker