making Func<> delegates persistable in windows phone 7

321 views Asked by At

I am developing an application for windows phone 7.I want to make my application persist-able so that I can restore my application after restart.

but the problem is that I have some func<> delegates members which are ,dynamically pointing to some functions ,in some of Class objects which I want to persist.

Actually I am serializing my func<> delegate member  using [datamember] attribute
and deserializeing it to persist state.

And I don not know whether they are persist-able or not in Wp7.

I know that it is persist-able in WPF.I read few articles and it seems it is not persist-able in WP7.

And What is an alternative for func<> if it is not persist-able in WP7.

1

There are 1 answers

0
Kolja On BEST ANSWER

You can serialize the delegates, but it is a bit risky cause only the compiler generated name is saved.

Look at this example