using System; using System.Reflection; namespace FLMID.Bugs.ParametersOne { public class Class[T] { public Add(mutable _x : T) : void { System.Console.WriteLine("OK"); } } public class Test { public static Main(mutable _args : array [string]) : void { mutable instance = Class.[string](); mutable _method = null : MethodInfo; { mutable temp_1_break_loop_ = false; foreach( method :> MethodInfo in typeof(Class[string]).GetMethods(BindingFlags.Instance %| BindingFlags.Public)) when (!temp_1_break_loop_ ) { when(method.Name.Equals("Add") && method.GetParameters().Length==1) { _method = method; temp_1_break_loop_ = true; } } _ = _method.Invoke(instance , array["1"]); } } } } /* BEGIN-OUTPUT OK END-OUTPUT */