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);
        }