AppDomain.ClearPrivatePathとは? わかりやすく解説

AppDomain.ClearPrivatePath メソッド

メモ : このメソッドは、互換性のために残されています。

プライベート アセンブリの場所を指定するパス空の文字列 ("") にリセットします。

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

<ObsoleteAttribute("AppDomain.ClearPrivatePath has been deprecated.
 Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")>
 _
Public Sub ClearPrivatePath
Dim instance As AppDomain

instance.ClearPrivatePath
[ObsoleteAttribute("AppDomain.ClearPrivatePath has been deprecated. Please investigate
 the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")]
 
public void ClearPrivatePath ()
[ObsoleteAttribute(L"AppDomain.ClearPrivatePath has been deprecated. Please
 investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")]
 
public:
virtual void ClearPrivatePath () sealed
/** @attribute ObsoleteAttribute("AppDomain.ClearPrivatePath has been deprecated.
 Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")
 */ 
public final void ClearPrivatePath ()
ObsoleteAttribute("AppDomain.ClearPrivatePath has been deprecated. Please investigate
 the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")
 
public final function ClearPrivatePath ()
例外例外
解説解説
使用例使用例
Imports System
Imports System.Reflection
Imports System.Security.Policy 'for evidence object

Class ADAppendPrivatePath
   
   Public Shared Sub Main()
      'Create evidence for new appdomain.
      Dim adevidence As Evidence = AppDomain.CurrentDomain.Evidence
      
      'Create the new application domain.
      Dim domain As AppDomain = AppDomain.CreateDomain("MyDomain",
 adevidence)
      
      'Display the current relative search path.
      Console.WriteLine("Relative search path is: "
 & domain.RelativeSearchPath)
      
      'Append the relative path.
      Dim Newpath As [String] = "www.code.microsoft.com"
      domain.AppendPrivatePath(Newpath)
      
      'Display the new relative search path.
      Console.WriteLine("Relative search path is: "
 & domain.RelativeSearchPath)
      
      'Clear the private search path.
      domain.ClearPrivatePath()
      
      'Display the new relative search path.
      Console.WriteLine("Relative search path is now: "
 & domain.RelativeSearchPath)
      
      
      AppDomain.Unload(domain)
   End Sub 'Main
End Class 'ADAppendPrivatePath
using System;
using System.Reflection;
using System.Security.Policy;  //for evidence object

class ADAppendPrivatePath
{
    public static void Main()
    {
        //Create evidence for new appdomain.
        Evidence adevidence = AppDomain.CurrentDomain.Evidence;

        //Create the new application domain.
        AppDomain domain = AppDomain.CreateDomain("MyDomain", adevidence);

        //Display the current relative search path.
        Console.WriteLine("Relative search path is: " + domain.RelativeSearchPath);

        //Append the relative path.
        String Newpath = "www.code.microsoft.com";
        domain.AppendPrivatePath(Newpath);

        //Display the new relative search path.
        Console.WriteLine("Relative search path is: " + domain.RelativeSearchPath);

        //Clear the private search path.
        domain.ClearPrivatePath();

        //Display the new relative search path.
        Console.WriteLine("Relative search path is now: " + domain.RelativeSearchPath);

 
        AppDomain.Unload(domain);    
    }
}
using namespace System;
using namespace System::Reflection;
using namespace System::Security::Policy;

//for evidence Object
int main()
{
   
   //Create evidence for new appdomain.
   Evidence^ adevidence = AppDomain::CurrentDomain->Evidence;
   
   //Create the new application domain.
   AppDomain^ domain = AppDomain::CreateDomain( "MyDomain", adevidence
 );
   
   //Display the current relative search path.
   Console::WriteLine( "Relative search path is: {0}", domain->RelativeSearchPath
 );
   
   //Append the relative path.
   String^ Newpath = "www.code.microsoft.com";
   domain->AppendPrivatePath( Newpath );
   
   //Display the new relative search path.
   Console::WriteLine( "Relative search path is: {0}", domain->RelativeSearchPath
 );
   
   //Clear the private search path.
   domain->ClearPrivatePath();
   
   //Display the new relative search path.
   Console::WriteLine( "Relative search path is now: {0}", domain->RelativeSearchPath
 );
   AppDomain::Unload( domain );
}

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

_AppDomain.ClearPrivatePath メソッド



このページでは「.NET Framework クラス ライブラリ リファレンス」からAppDomain.ClearPrivatePathを検索した結果を表示しています。
Weblioに収録されているすべての辞書からAppDomain.ClearPrivatePathを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からAppDomain.ClearPrivatePath を検索

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

辞書ショートカット

すべての辞書の索引

「AppDomain.ClearPrivatePath」の関連用語

AppDomain.ClearPrivatePathのお隣キーワード
検索ランキング

   

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



AppDomain.ClearPrivatePathのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS