IE, I have a class such as Game, and another called GameList, which is simply an organised list of Game objects.
I need to transfer the GameList object between two devices (via Bluetooth). While I suppose I could faff around trying object transfer or actually serializing the object (which appears terribly complicated in .NET), I simply parse the whole lot to a string, and transmit that.
For example, a sample string might look like:
- Code: Select all
Game One|Developer One|^Game Two|Developer Two| etc.1 lines; 0 keywds; 0 nums; 6 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
This is then parsed on the receiving device and a new GamesList object created. Apart from the obvious computational overhead and the risk of a title containing one of the delimiting characters, is this a practice seriously frowned upon? Is there a simple alternative?