Reputation: 49042
I am getting the members of a dynamic class using the following method:
public static IEnumerable<string> GetDynamicMemberNames(this IDynamicMetaObjectProvider dynamicProvider)
{
DynamicMetaObject metaObject = dynamicProvider.GetMetaObject(Expression.Constant(dynamicProvider));
return metaObject.GetDynamicMemberNames();
}
How can I now get more information about what the members are? e.g. whether the member is a property or a method, property return types, etc
Upvotes: 2
Views: 985
Reputation: 1500775
You can't, I'm afraid. That's all the information which is exposed. In some cases, the same member name could work as both a property and a method - for example, it could return a delegate if you fetch it as a property, but execute the same code if you call it as a method.
Upvotes: 2