_XDocument4.Role 属性

获取或设置用户的当前角色。

命名空间:  Microsoft.Office.Interop.InfoPath.SemiTrust
程序集:  Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)

语法

声明
Property Role As String
    Get
    Set
用法
Dim instance As _XDocument4
Dim value As String

value = instance.Role

instance.Role = value
string Role { get; set; }

属性值

类型:System.String

实现

_XDocument3.Role
_XDocument2.Role

备注

重要

此成员只能由与当前打开的表单在相同域中运行的表单访问,或者由已授予跨域权限的表单访问。

示例

在以下示例中,Role 属性用于确定当前用户的角色。

string currentRole = thisXDocument.Role;

另请参阅

引用

_XDocument4 接口

_XDocument4 成员

Role 重载

Microsoft.Office.Interop.InfoPath.SemiTrust 命名空间