methodinfo
How to determine if ParameterInfo is of generic type?
I have a MethodInfo of a GenericMethodDefinition.Such as: CallMethod<T>(T arg, string arg2).The GetParameters() method will give me two ParameterInfo objects, the f开发者_Python百科irst of which[详细]
2023-02-05 07:37 分类:问答Parsing to primitive types, based on user input in c#
My code to do this uses reflection and strings that I give it, instead of user input.Ultimately I would like the user to be able to say \"float\" \"2.0\" and have the computer say, yeah, that\'s a flo[详细]
2023-02-03 21:38 分类:问答Silverlight Reflection | GetCurrentMethod with passed parameters
I want to print the current method call (incl. return value) to the Visual Studio Output like this: public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)[详细]
2023-02-02 07:33 分类:问答MethodInfo.Invoke requires admin on windows 7?
So I am loading an assembly at runtime and I also am using generics depending on the assembly type.To get the right type, each DLL is implementing a factory that I expect to be there which开发者_如何学[详细]
2023-01-30 14:41 分类:问答Using reflection to get generic MethodInfo without using a string name and the generic parameters are resolved at runtime
I am writing a sub dependency resolver for castle windsor. The resolver returns an object that implements a generic interface. The generic parameters are resolved at runtime and factory is used to ret[详细]
2023-01-29 17:02 分类:问答MethodInfo and Delegates
I am using dotnet 2.0 I know that with an EventInfo value, you can loop through an Assembly\'s Types and find all the methods that match the EventInfo delegate definition ( EventInfo.EventHandlerType[详细]
2023-01-18 23:32 分类:问答Can the .NET MethodInfo cache be cleared or disabled?
Per MSDN, calling Type.GetMethods() stores reflected method information in a MemberInfo cache so the expensive operation doesn\'t have to be performed again.[详细]
2023-01-03 16:58 分类:问答Checking a MethodInfo against a delegate
How can I determine if a MethodInfo fits a distinct Delegate Type? bool IsMyDelegate(MethodInfo method);[详细]
2022-12-20 00:10 分类:问答How do I determine which interface is referenced by an explicitly-implemented MethodInfo object?
I have a MethodInfo object that represents an explicitly-implemented interface method, as follows. MethodInfo GetMethod()[详细]
2022-12-15 00:42 分类:问答How to test if MethodInfo.ReturnType is type of System.Void?
Using reflection to obtain a MethodInfo, I want to test if the type returned is typeof System.Void. Testing if it is System.Int32 works fine[详细]
2022-12-13 08:03 分类:问答