ArrayList can contain any object, how can you save an ArrayList directly in the database? consider serialize it into a binary format and use an image column or serialize it into an xml format and use text/ntext column

解决方案 »

  1.   

    Thank u,
    but hou to 'serialize'?
    Could u please give me a sample or point out somewhere i can learn that.
    thanks.
      

  2.   

    http://www.ondotnet.com/pub/a/dotnet/2002/08/26/serialization.html?page=4http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlserializationxmlelementattributesclasstopic.asp
      

  3.   

    Thank u, i've read them, to 'serialize' it with '.Serialize(myStream, shapes)' seems to be easier, but, excuse me, would u please tell me how to 'Serialize' it into Binary(that's different from stream, right?)? i'm new. 
    Thank u very much.