static WeakDelegate setup() { var target = new ClassWithMethod(); Func<string, double, int> @delegate = target.SomeMethod; var weakDelegate = new WeakDelegate(@delegate); return weakDelegate; }
static WeakDelegate setup() { var target = new ClassWithMethod(); target = new ClassWithMethod(); Func <string, double, int> @delegate = target.SomeMethod; var weakDelegate = new WeakDelegate(@delegate); return(weakDelegate); }