using System; using System.Linq; using System.Threading; static class Extensions { public static Delegate ConvertTo(this Delegate self, Type type) { if (type == null) { throw new ArgumentNullException("type"); } if (self == null) { return null; } return Delegate.Combine( self.GetInvocationList() .Select(i => Delegate.CreateDelegate(type, i.Target, i.Method)) .ToArray()); } } class Program { static void Main() { Action x = delegate { }; x += new Action(delegate { }); ThreadStart badCopy = new ThreadStart(x); ThreadStart goodCopy = (ThreadStart)x.ConvertTo(typeof(ThreadStart)); Console.WriteLine("x == badCopy: {0}", x.Equals(badCopy)); Console.WriteLine("x == goodCopy: {0}", x.Equals(goodCopy)); } }