Reputation: 11689
I need to serialize a collection, but I would like to know if there is any already serializable collection before taking code from third parts or write it by myself. I already implemented some serializable collection, but this is a stupid situation where I just need to pass an array of serializable classes to the clipboard and back from it (copy/paste).
Any suggestion on what should I use?
Upvotes: 6
Views: 6336
Reputation: 61437
Any class in the System.Collections
or System.Collections.Generic
namespace should be serializable. However, this doesn't mean that the content (or in the case of generics, T
is serializable). This is visible with Dictionary<K,V>
, as KeyValuePair<K,V>
isn't directly serializable.
Upvotes: 9