how to pass/transfer out parameter as reflection? - visual studio extensibility c#
问题 I have an out parameter. Is it possible to transfer it as reflection? Can you give me some examples how to do that? 回答1: I'm not sure what this has to do with VS extensibility, but it's certainly possible to invoke a method with an out parameter by reflection and find out the out parameter's value afterwards: using System; using System.Reflection; class Test { static void Main() { MethodInfo method = typeof(int).GetMethod ("TryParse", new Type[] { typeof(string), typeof(int).MakeByRefType() }