I have a small amount of information to transfer between devices. It's uncomplicated, consisting of a simple list of class attributes.
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:
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?
Cheers,
David.
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:
Game One|Developer One|^Game Two|Developer Two| etc.
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?
Cheers,
David.