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; }
public override void ModifyIncomingRefTypeParameter(RefTypeExample example) { example.test += 10; }
public virtual void ModifyIncomingRefTypeParameter(RefTypeExample example) { example.test += 5; }