Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I serialized lambda expressions in C# before. Now I wanna use F# instead of C# for serialization and deserialization.

I heard F# is better in this area. Is it true? How can I do that with F#?

I’d appreciate even if you just suggested a correlated link.

share|improve this question
can you collect all possible lambdas in a single array (statically)? if so just serialize the index in that array – ratchet freak Jun 25 '13 at 11:39
up vote 2 down vote accepted

I heard F# is act better in this area. Is it true?

Yes, the F# Expr type is marked as [Serializable], so you can use for example binary serialization with it. On the other hand the C# (and VB) Expression is not [Serializable], so to serialize it, you would either need to write quite a lot of code yourself, or use a library for that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.