Thursday 15 July 2010

c# - Negating a method call in an Expression tree -


I am generating the AC # link expression dynamically, which will run the string (below example). Collection Value.

  var dynamicMethod = "include"; Var parameter = expression. Parameter (Typf (Myclass), "Type"); Var Properties = Expression Property (parameter, "mimper per"); Var constantValue = expression Constant ("property value", property type); Var method = property.Type.GetMethod (dynamic method, new [] {property.Type}); Var expression = expression. Call (property, method, continuous view);  

For the above code, I want something equal! Contains.

Any suggestions?

Thank you.

What about it? It would simply be:

  var condition = expression Not (included_call);  

No comments:

Post a Comment