示例#1
0
        public void test()
        {
            var reftypeparam = new RefTypeExample();

            List <Handle> handlers = new List <Handle>
            {
                new AdvancedHandleChild(),
                new HandleChild(),
                new SimpleHandleChild()
            };

            int test2 = 0;

            foreach (var handler in handlers)
            {
                handler.ModifyIncomingRefTypeParameter(reftypeparam);
            }

            //handlers[0].ModifyIncomingRefTypeParameter(reftypeparam);
            //handlers[0].ModifyIncomingRefTypeParameter(reftypeparam);

            handlers[0].ModifyIncomingValTypeParameter(test2);

            var dsafdsa = reftypeparam.test;

            var dfsa = test2;
        }
示例#2
0
 public override void ModifyIncomingRefTypeParameter(RefTypeExample example)
 {
     example.test += 10;
 }
示例#3
0
 public virtual void ModifyIncomingRefTypeParameter(RefTypeExample example)
 {
     example.test += 5;
 }