Can I save an 'Object' in a SQL Server database?

后端 未结 5 433
傲寒
傲寒 2020-12-04 10:29

I want to save an object (of any type) into a field in a database in SQL Server 2005. Is it possible? Do I have to convert the object into something, like a byte array for e

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 10:40

    To do this you need to serialize your object. You can look here at examples:

    http://www.c-sharpcorner.com/UploadFile/bipinjoshi/serializingObjectsinCS11102005234746PM/serializingObjectsinCS.aspx

提交回复
热议问题