public class ViewPageClass > { > public void GetPage() > { > Parser p = new Parser(); > // Replace default handling. > p.handler = SpecificReplaceWithThisContent; > bool b = p.ReplaceWithThisContent(); > } > > public bool SpecificReplaceWithThisContent() > { > return false; > } > > } > public class Parser > { > public delegate bool Doit(); > > public Doit handler; > > public bool ReplaceWithThisContent() > { > if (handler != null) > { > return handler(); > } > else > { > //Do the default handling. E.g: > return false; > } > } > }}So a call to Parser.ReplaceWithThisContent() will actually run the ViewPageClass.SpecificReplaceWithContent()