we can easily serialize class to flat file but if i want to serialize class to database then how could i do it and if it is possible then how can i deserialize data from db to c
When serializing an object, it is often done to a stream. You can serialize to a memory stream, then read the bytes back and put them into a database.
What serialization code do you have currently? It would be better to tell you how to modify it than to just give you the full code.