Hi Experts,
My Name is Somnath .I am working ASP.net Project in which I am using Linq
I am creating Dynamic Lamabada Expression using Expression tree
I want to use DateTime.Parse method for both the side for Property as well as Constant.
I tried following way but I am getting an error.
MethodInfo methodDateTimeParse = typeof(DateTime).GetMethod("Parse", new Type[] { typeof(string) });
Expression ExprLeft = Expression.Call(Expression.Property(variable, oFC.Field), methodDateTimeParse); //Getiing error at this line (
Static method requires null instance, non-static method requires non-null instance.
Parameter name: instance
)
Please provide help
Thanks & Regards,
Somnath
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.