Serializing data (to save and load it) should be easy. That’s what serialization is all about! In .NET it is really simple to serialize even quite complex networks of objects using the BinaryFormatter class. But the latest versions of .NET warn you that BinaryFormatter is insecure and suggest that you use some different type of serialization such as JSON.
It sounds easy. But it isn’t.
I’ll look at JSON in more detail in future videos. In this lesson, I want to explain what serialization is and how you can suppress the BinaryFormatter errors using the pragma:
#pragma warning disable SYSLIB0011
To follow this course, bookmark the Complete Course In Adventure Game Programming Playlist:
[ Ссылка ]
Huw Collingbourne is author of The Little Book Of Adventure Game Programming In C#. Available from:
* Amazon (US) [ Ссылка ]
* Amazon (UK) [ Ссылка ]
And also, The Little Java Book Of Adventure Game Programming. Available from:
* Amazon (US) [ Ссылка ]
* Amazon (UK) [ Ссылка ]
If you are eager to get working on your own adventure game, you can download Huw’s free game-writing code libraries, BIFF (the Bitwise Interactive Fiction Framework) from:
[ Ссылка ]
Facebook: [ Ссылка ]
Ещё видео!