System.Dynamic.DynamicObject.MetaDynamic.IsOverridden C# (CSharp) Method

IsOverridden() private method

Checks if the derived type has overridden the specified method. If there is no implementation for the method provided then Dynamic falls back to the base class behavior which lets the call site determine how the binder is performed.
private IsOverridden ( string method ) : bool
method string
return bool
            private bool IsOverridden(string method) {
                var methods = Value.GetType().GetMember(method, MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance);

                foreach (MethodInfo mi in methods) {
                    if (mi.DeclaringType != typeof(DynamicObject) && mi.GetBaseDefinition().DeclaringType == typeof(DynamicObject)) {
                        return true;
                    }
                }

                return false;
            }