![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
I am having a problem with .NET Framework v1.1, where it doesn't seem to like custom serialization with classes derived from CollectionBase. It basically NULLS out all contained objects when retrieving... The following code works fine in .NET Framework 1.0, but does not in .NET Framework 1.1 (when added to a class derived from CollectionBase): public ListDerivedFromCollectionBase (SerializationInfo info, StreamingContext context) { ArrayList list = (ArrayList)info.GetValue("list", typeof(ArrayList)); InnerList.Clear(); InnerList.AddRange(list); } public void GetObjectData (SerializationInfo info, StreamingContext context) { info.AddValue("list", InnerList); } The reasoning for this is so that other members can be added to the list that serialize, and so that error handling can be added for serializing to/from a database. Any help on this would be appreciated. Thanks, Curtis. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |