E
Earl Teigrob
I am saving and restoring value types such as Int32, DateTime and Boolean in
strings. I was wondering if there is a mechanism build into .NET for
serializing and deserializing these to string format. I can, of course,
serialize a class to a file, either binary or XML, but this is not what I am
looking for. Currently I am using ToString() or Convert.xxx to do this, but
thought that if there was a true serializer, deserializer, that would be
perfect.
An example would be the way that a DateTime column in a DataTable is
serialized to XML. It is converted to the format
"2004-04-30T19:30:00.0000000-05:00". Microsoft has built a special DateTime
serializer into there XML converter to save (and restore) DateTime in a
string (for XML) format. This saves the time with maximum precision,
relative to MGT.
Can I access to class to do something similar?
Thanks for you Input
Earl
strings. I was wondering if there is a mechanism build into .NET for
serializing and deserializing these to string format. I can, of course,
serialize a class to a file, either binary or XML, but this is not what I am
looking for. Currently I am using ToString() or Convert.xxx to do this, but
thought that if there was a true serializer, deserializer, that would be
perfect.
An example would be the way that a DateTime column in a DataTable is
serialized to XML. It is converted to the format
"2004-04-30T19:30:00.0000000-05:00". Microsoft has built a special DateTime
serializer into there XML converter to save (and restore) DateTime in a
string (for XML) format. This saves the time with maximum precision,
relative to MGT.
Can I access to class to do something similar?
Thanks for you Input
Earl