I dont know if delegates can do this in c#. Pretty sure you can in c++ using function pointers. The concept is basically this (NOT ACTUAL CODE):
Code:class myClass { private PointerType goHere = AddressOf(Sub1) private void Main() { goHere } private void Sub1() { if ( your condition ) { goHere = AddressOf(Sub2) } } private void Sub2() { } }




Reply With Quote