Class DynamicDispatch.Example Extends %RegisteredObject { Method Foo() { Write "This is foo", ! } Method Bar() { Write "This is bar", ! } Method %DispatchMethod(Method As %String, Args...) { Write "Tried to handle unknown method '"_Method_"'" For i=1:1:$Get(Args) { Write ", " If i=1 Write "with arguments: " Write "'"_Args(i)_"'" } Write ! } ClassMethod Test() { Set obj=##class(DynamicDispatch.Example).%New() Do obj.Foo() Do obj.Bar() Do obj.Grill() Do obj.Ding("Dong", 11) } }