Resets the path that specifies the location of private assemblies to the empty string ("").
using System;
using System.Reflection;
using System.Security.Policy;
class ADAppendPrivatePath
{
public static void Main()
{
Evidence adevidence = AppDomain.CurrentDomain.Evidence;
AppDomain domain = AppDomain.CreateDomain("MyDomain", adevidence);
Console.WriteLine("Relative search path is: " + domain.RelativeSearchPath);
String Newpath = "www.domain.com";
domain.AppendPrivatePath(Newpath);
Console.WriteLine("Relative search path is: " + domain.RelativeSearchPath);
domain.ClearPrivatePath();
Console.WriteLine("Relative search path is now: " + domain.RelativeSearchPath);
AppDomain.Unload(domain);
}
}
Related examples in the same category