次の方法で共有


PermissionSet.Count プロパティ

アクセス許可セットに格納されているアクセス許可オブジェクトの数を取得します。

Public Overridable ReadOnly Property Count As Integer  Implements _   ICollection.Count
[C#]
public virtual int Count {get;}
[C++]
public: __property virtual int get_Count();
[JScript]
public function get Count() : int;

プロパティ値

PermissionSet に格納されているアクセス許可オブジェクトの数。

実装

ICollection.Count

解説

None 状態または Unrestricted 状態では、実際のアクセス許可オブジェクト インスタンスが使用されないため、0 が返されます。

使用例

 
' Display the number of permissions in the set.
Console.WriteLine("Number of permissions = " & ps1.Count)

[C#] 
// Display the number of permissions in the set.
Console.WriteLine("Number of permissions = " + ps1.Count);

[C++] 
// Display the number of permissions in the set.
Console::WriteLine(S"Number of permissions = {0}", __box(ps1->Count));

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, Common Language Infrastructure (CLI) Standard

参照

PermissionSet クラス | PermissionSet メンバ | System.Security 名前空間