# Wednesday, May 24, 2006
Testing publishing directly from FireFox with Performancing
posted on Wednesday, May 24, 2006 1:34:36 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
It just goes to show that there are always little surprises waiting around the corner.  I've been looking at least casually at .Net 2.0 since Beta 2, and I even read through the "What's New" for C# 2.0 to see if I missed anything.  Somehow I managed not to notice Implicit Delegate Assignment (or at least that's what I'm calling it).

It is now possible to assign a delegate using just the Class and Method name...you no longer have to create a new instance of the delegate type.  Not a huge thing, I know, but for those of us who are easily impressed it's, well, impressive.

Here's the skinny in code language:

public class SomeClass
{
    public event EventHandler MyEvent;
}

public class SomeOtherClass
{
    SomeClass _class; 
    public SomeOtherClass()
    {
        _class = new SomeClass();   
        // Old Way
        _class.MyEvent += new EventHandler(this.MyHandler);
        
       // New Way
       _class.MyEvent += this.MyHandler;
    }

    public void EventHandler(object sender, EventArgs args)
    {
        // Handler Code
    }
}
posted on Wednesday, May 24, 2006 12:30:23 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Wednesday, May 10, 2006
The Dr. is back....after a few years away, I've now decided to make DrRandom.org a blog...come back for more.

posted on Wednesday, May 10, 2006 1:32:08 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback