From 839a32d7976470dcd21221c5d4623a9f81f28eea Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Tue, 10 Jun 2014 15:23:10 +0200 Subject: [PATCH] Value: Make GetMethod more specific to avoid ambigous matches This patch prevents GetMethod from throwing an AmbiguousMatchException because several constructors were found. --- glib/Value.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/Value.cs b/glib/Value.cs index 4df6dbfbc..e07021b4f 100644 --- a/glib/Value.cs +++ b/glib/Value.cs @@ -424,7 +424,7 @@ namespace GLib { else if (t.IsSubclassOf (typeof (GLib.Opaque))) return (GLib.Opaque) this; - MethodInfo mi = t.GetMethod ("New", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy); + MethodInfo mi = t.GetMethod ("New", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy, null, new Type[] { typeof(IntPtr) }, null); if (mi != null) return mi.Invoke (null, new object[] {boxed_ptr});