开发者

How To Create A Linq Expression Dynamically?

开发者 https://www.devze.com 2023-01-24 01:17 出处:网络
I\'m trying to figure out a way to create Linq Expressions dynamically.As I 开发者_开发百科understand them, these expressions are one of the new meta-programming features in introduced into .NETI\'m t

I'm trying to figure out a way to create Linq Expressions dynamically. As I 开发者_开发百科understand them, these expressions are one of the new meta-programming features in introduced into .NET I'm thinking that to dynamically create these expressions I could do it from a string value, but there is also mention of being able to do this at runtime. An example in VB.NET or C# would be great.


You can do this using the Expression class. See http://community.bartdesmet.net/blogs/bart/archive/2006/11/22/Getting-started-with-C_2300_-3.0-Expression-Trees.aspx for an explanation and references to more articles on how to accomplish this.

0

精彩评论

暂无评论...
验证码 换一张
取 消