Questions tagged [iserializable]
53 questions
0
votes
1 answer
Custom ISerializable from Base class
I'm trying to keep my session in SQLServer. I know if an object needs to be stored in SQL than it needs to be Serialized. And i also know that i need to put [Serializable] attribute on every class if necessary. But the problem is i have more than…

Murat
- 149
- 1
- 16
0
votes
1 answer
How to structure classes to Implement IEquatable and ISerializable
Been banging my head on this for a while now
The problem I have is trying to add the IEquatable behaviour so my derived classes can use set operations Intersect of ILink etc.
At the moment I have...
public interface ILink
{
int Linkid { get;…

MikeW
- 185
- 1
- 3
- 14
0
votes
2 answers
ISerializable Circular Reference
I've been trying to understand how to correctly implement a circular reference using the ISerializable interface. But i have not been able to work out even in a simple form, I have read the explanation here
But I have not been able to implement…

TigerChan
- 88
- 1
- 5
0
votes
0 answers
Serialization "ClassName" class, which has property typeof(Encoding) c#
I'm sorry if it looks stupid, but I really can`t understand how to serialize my own class which has property:
public Encoding EncodingName {get;set;}.
Can someone explain what is the best way to solve my problem?

okk
- 420
- 5
- 7
0
votes
0 answers
Custom deserialization in Silverlight 5
I am trying to figure out how to implement custom serialization/deserialization logic in a Silverlight app. In a standard .NET app, I can simply implement ISerializable to control how the object is serialized and provide the 'deserialization…

SonOfPirate
- 5,642
- 3
- 41
- 97
0
votes
1 answer
Subclassed DataTable changes DataType information from Double to String during Serialisation/Deserialisation
By way of background to this question, I want to bind a "code made" DataTable to an aspx:GridView. To persist this table I implement the ISerializable interface. The table is displayed correct, but in postback for sorting the rows, a…

jahu
- 533
- 4
- 15
-1
votes
1 answer
ISerializable for Collection
I am writing the serialization code for a Collection class and would like to know how to set and get the items in the collection. I am using Binary serialization.
I have made an attempt in the following code, but am not sure on the correct…

Simon
- 7,991
- 21
- 83
- 163
-1
votes
1 answer
System.InvalidCastException "Object must implement IConvertible." when deserializing a Dictionary using a BinaryFormatter
[Serializable]
public class CustomFields : MyObject, ICustomFields // MyObject is marked as ISerializable
{
private IDictionary _customFieldDictionary;
public CustomFields( ) {
this._customFieldDictionary = new…

D A M
- 36
- 8