ResourcePermissionBase.TagNames 属性

定义

获取或设置标识处于保护中的资源的字符串数组。Gets or sets an array of strings that identify the resource you are protecting.

protected:
 property cli::array <System::String ^> ^ TagNames { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
protected string[] TagNames { get; set; }
member this.TagNames : string[] with get, set
Protected Property TagNames As String()

属性值

String[]

标识处于保护中的资源的字符串数组。An array of strings that identify the resource you are trying to protect.

例外

属性值为 nullThe property value is null.

数组的长度为 0。The length of the array is 0.

继承者说明

当从继承时 ResourcePermissionBase ,必须设置此属性。When you inherit from ResourcePermissionBase, you must set this property. 有关此类的实现的示例,请参见 PerformanceCounterPermissionFor an example of an implementation of this class, see PerformanceCounterPermission. 在中 PerformanceCounterPermissionTagNames 属性专用于 "计算机" 和 "类别"。In PerformanceCounterPermission, the TagNames property is set privately to "Machine" and "Category".

适用于