observable - How to serialize ObservableCollection in C#? -


i have observable collection "ob" needs serialized before can sent print functionality.

i received suggestion make class stated below

public class obcollection : observablecollection<viewmodel> { } 

and use obcollection in place of "ob" not works.

any suggestions on this?

i've tried below things:

  • marking class serializable.
  • marking observable collection data member.
  • adding parameterless constructor in class off observable collection part.

observablecollection<t> implements ienumerable<t> should able convert list<t> or t[] enough tolist()/toarray() extensions. both of can serialized datacontractserializer without issue (as long attributes applied).


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -