Simple question about Serializing classes
I'm using serialization to store the data in a collection of objects to disk....
Will this mean that every method in a class will be saved as well? I really only want to store the state of the properties, not the methods... (or does serialization only save the properties?)
I have looked thru my books, and can't tell for sure...
If serialization does save the method functions... how would one go about customizing the serialization to not include the methods...?
For example:
VB Code:
Public Class Style
Private styID As Int32
Public Property StyleID() As Int32
Public Sub New(ByVal StyleID As Int32, ByVal StyleName As String, ByVal ManufacturerID As Int32)
End Class
I really only want to save the StyleID, not the code for the constructor... does serialization save the constructor code to disk as well?