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

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

            return(weakDelegate);
        }