RegistryPermission.Copy メソッド
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Dim instance As RegistryPermission Dim returnValue As IPermission returnValue = instance.Copy
現在のアクセス許可のコピー。
使用例
Copy メソッドを使用するコード例を次に示します。このコード例は、RegistryPermission クラスのトピックで取り上げているコード例の一部分です。
'Copy creates and returns an identical copy of the current permission. Private Function CopyDemo() As Boolean Dim returnValue As Boolean = True readPerm4 = CType(readPerm1.Copy(), RegistryPermission) If Not (readPerm4 Is Nothing) Then Console.WriteLine("Result of copy = " + readPerm4.ToXml().ToString() + vbLf) Else Console.WriteLine("Result of copy is null. " + vbLf) End If Return returnValue End Function 'CopyDemo
//Copy creates and returns an identical copy of the current permission. private bool CopyDemo() { bool returnValue = true; readPerm4 = (RegistryPermission)readPerm1.Copy(); if (readPerm4 != null) { Console.WriteLine("Result of copy = " + readPerm4.ToString() + "\n"); } else { Console.WriteLine("Result of copy is null. \n"); } return returnValue; }
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- RegistryPermission.Copy メソッドのページへのリンク