WebPermission.Copy メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebPermission.Copy メソッドの意味・解説 

WebPermission.Copy メソッド

WebPermission のコピー作成します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public Overrides Function
 Copy As IPermission
Dim instance As WebPermission
Dim returnValue As IPermission

returnValue = instance.Copy
public override IPermission Copy ()
public IPermission Copy ()

戻り値
元のクラスと同じ値を持つ WebPermission クラス新しインスタンス

解説解説

このメソッドによって返された IPermission は、元の WebPermissionリソースへのアクセスと同じリソースへのアクセス表します。このメソッドは、Copyオーバーライドし、IPermission インターフェイスサポートするために実装されます

使用例使用例

Copy使用して WebPermission2 番目のインスタンス作成する方法の例を次に示します。この 2 番目のインスタンスは、最初インスタンスと同じです。

' Create another WebPermission instance that is the copy of the above
 WebPermission instance.
Dim myWebPermission2 As WebPermission = CType(myWebPermission1.Copy(),
 WebPermission)

' Check whether all callers higher in the call stack have been granted
 the permissionor not.
myWebPermission2.Demand()

// Create another WebPermission instance that is the copy of the above
 WebPermission instance.
 WebPermission myWebPermission2 = (WebPermission) myWebPermission1.Copy();

// Check whether all callers higher in the call stack have been granted
 the permissionor not.
myWebPermission2.Demand();
   
// Create another WebPermission instance that is the copy of the above
 WebPermission instance.
WebPermission^ myWebPermission2 = (WebPermission^)(myWebPermission1->Copy());

// Check whether all callers higher in the call stack have been granted
 the permissionor not.
myWebPermission2->Demand();
// Create another WebPermission instance that is the copy of the above
// WebPermission instance.
WebPermission myWebPermission2 = (WebPermission)myWebPermission1.Copy();
// Check whether all callers higher in the call stack have been granted
// the permissionor not.
myWebPermission2.Demand();
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

WebPermission.Copy メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebPermission.Copy メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS