次の方法で共有


EnvironmentPermissionAttribute.Read プロパティ

文字列値が指定する環境変数への読み取りアクセスを取得または設定します。

Public Property Read As String
[C#]
public string Read {get; set;}
[C++]
public: __property String* get_Read();public: __property void set_Read(String*);
[JScript]
public function get Read() : String;public function set Read(String);

プロパティ値

読み取りアクセス用の環境変数の一覧。

解説

環境変数名では、大文字と小文字は区別されません。複数の環境変数名は、 PathSeparator を使用して、それぞれの名前を区切って指定します。

使用例

 
' Set the Read property for a PermitOnly SecurityAction.
' Set the All property for a PermitOnly SecurityAction.
' Set the Read, All, and Write properties.
<EnvironmentPermissionAttribute(SecurityAction.PermitOnly, Read:="COMPUTERNAME"), _
EnvironmentPermissionAttribute(SecurityAction.PermitOnly, All:="USERNAME"), _
EnvironmentPermissionAttribute(SecurityAction.PermitOnly, Write:="USERDOMAIN")> _
Public Shared Sub PermitOnlyMethod()

[C#] 
// Set the Read property for a PermitOnly SecurityAction.
[EnvironmentPermissionAttribute(SecurityAction.PermitOnly, Read = "COMPUTERNAME")] 

[C++] 
// Set the Read property for a PermitOnly SecurityAction.
[EnvironmentPermissionAttribute(SecurityAction::PermitOnly, Read = S"COMPUTERNAME")] 

[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

参照

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