Assembly Loaeded In App Domain Notification C# with Example



Assembly Loaeded In App Domain Notification C# with Example

 using System;
namespace CSharpMultiThreading
{
	class ApplicationDomain
	{
		static void Main(string[] args)
		{
			DisplayDADStats();
		}
		
		public static void DisplayDADStats()
		{
			// Get access to the AppDomain for the current thread.
			AppDomain defaultAD = AppDomain.CurrentDomain;
			defaultAD.AssemblyLoad += (o, s) => 
			{
				Console.WriteLine("{0} has been loaded in current AppDomain", s.LoadedAssembly.GetName().Name);
			};
		}
	}
}
 

0 Comment's

Comment Form