Tag: C#

Dirt Simple C# .NET Custom Event for UserControl

Here’s my simple version using System.ComponentModel; //Define a class to hold the event arguments, if one isn’t already defined. public class DesignEventArgs : EventArgs { private DesignListItem item; public DesignEventArgs(DesignListItem item) { this.item = item; } public DesignListItem Item {

Tagged with: , , , , , ,

C# .NET AppDomains, How to check if Unloaded

This hack is a quick and easy way to determine if a specific domain is loaded or unloaded. namespace AppDomains { class Program { static void Main(string[] args) { string domainName = “MY DOMAIN NAME”; MySerializedData serialData = new MySerializedData();

Tagged with: , , ,

C# .NET AppDomains

Create a single instance of an application domain. /* Dirt simple usage: * 1. AppDomain.Create * 2. AppDomain.SetData * 3. AppDomain.DoCallBack * 4. AppDomain.Unload */ namespace AppDomains { class Program { static void Main(string[] args) { MySerializedData serialData = new

Tagged with: , ,
Top