Expression Trees in C#: Serializing and Deserializing

c# expression-trees serialization

Question

Is there a way to Deserialize Expressions in C#, I would like to store Expressions in a Database and load them at run time.

2
89
4/5/2009 6:15:41 AM

Accepted Answer

I continued work on the library that was mentioned by Serializing and Deserializing Expression Trees in C#

It looks like the project was abandoned (2008) but I did some work on it and now it works with .NET 4.0 and Silverlight. I made bug fixes to their code and also made it more DAL-independent.

http://expressiontree.codeplex.com/

48
5/23/2017 12:32:31 PM

Expert Answer

Not in full; however, the Dynamic LINQ sample may help a bit. You can certainly serialize an expression to a string (to an extent - generics look a bit screwy), but there is no inbuilt parser.

2
10/20/2008 10:16:29 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow