MyExternalMethod(this);
public method MyExternalMethod(object xyz) { (xyz as NinjaScriptBase).Print("hello"); }
At this moment, many programmers, like me, use multiple lines of codes (from external classes) to achieve the simple thing
public method MyExternalMethod(object xyz) { if (xyz is Indicator) (xyz as indicator).RemoveDrawObject("arrow"); if (xyz is Strategy) (xyz as Strategy).RemoveDrawObject("arrow"); }
so, just create `NinjaScriptRenderBase` base class for those two classes, so, we make things simpler:
public method MyExternalMethod(object xyz) { (xyz as NinjaScript[B]Render[/B]Base).RemoveDrawObject("arrow"); }
Comment