I'm looking at the examples for overriding TryInvokeMember
on DynamicObject
to implement dynamic method binding. The signature is as follows
public virtual bool TryInvokeMember(
InvokeMemberBinder binder,
Object[] args,
out Object result
)
Obviously result
is used to pass the result back to the caller.
Since there is no overload for TryInvokeMember
without the result
out parameter, I assume this method must handle void methods as well. In that case are there any guidelines for what result
should be set to?
The default implementation on DynamicObject
sets result
to null, and that would be my default choice as well, but I haven't been able to find any mention of this in the examples. Are there any guidelines for this? Does it even matter what the result is?