C# FileInput to class
Is it possible to read into a class? (Which was possible in C)
--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
C doesn''t have classes. Therefore reading into a class is not possible in C.
You can deserialize an object from a stream in C#. Look up the formatter classes: BinaryFormatter and SoapFormatter.
You can deserialize an object from a stream in C#. Look up the formatter classes: BinaryFormatter and SoapFormatter.
Thanks, I meant C++ by the way.
--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
and if you just want standard binary serialization, all you need to add to a class is the [ Serializable ] attribute.
But there are other attributes to allow custom serialization (or implement the ISerializable interface) ... or roll your own system.
But there are other attributes to allow custom serialization (or implement the ISerializable interface) ... or roll your own system.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement