Why Isn't My .Net Object Serializable?
        Posted  
        
            by Rob P.
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Rob P.
        
        
        
        Published on 2010-06-02T22:01:13Z
        Indexed on 
            2010/06/02
            22:04 UTC
        
        
        Read the original article
        Hit count: 215
        
I've got a 'MyDataTable' class that inherits from System.Data.DataTable
I've implemented ISerializable in my class and have a 'Public Overrides Sub GetObjectData...'
But when I try to serialize the an object of 'MyDataTable' I get an error saying that 'MyDataTable' is not marked as serializable.
If I used a DataTable instead - my code serializes correctly. If I add a serializable attribute to the 'MyDataTable' class - it serializes correctly, but I'm told that is unnecessary if I implement ISerializable.
Can someone point me in the right direction?
© Stack Overflow or respective owner