Skip to content

call method with ref #17

@trivalik

Description

@trivalik

When you wanna call dynamicControl.DefWndProc(ref m); it does not work. So I add to method ParametersCompatible the follow workarround:

               if (params1[i].ParameterType.IsByRef) {
                    var p2 = params2[i].GetType().MakeByRefType();
                    //TODO support derivation
                    if (params1[i].ParameterType != p2) {
                        return false;
                    }
                }
                else {
                    if (!params1[i].ParameterType.IsInstanceOfType(params2[i])) {
                        // Parameters should be instance of the parameter type.
                        return false;
                    }
                }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions