Click here to Skip to main content
15,886,199 members

Comments by djdynamix (Top 17 by date)

djdynamix 9-Oct-12 11:30am View    
Once again, thank you, Sergey. Some example code would definitely be helpful.

I've now realised that the reason I was confused is merely terminology. After reading through some of the pages you linked, I now see that "serializaton" is just "marshalling" by another name. Silly of me really, as "Serialization" is a much more descriptive term!

In this case, I've decided to stick with XML just this once, as I now have the whole project working, and I'd be loathe to go back and recode it when I'm on a deadline. The problem was a result of my not realising that a User AppConfig file is stored separately, in a different location to the main AppConfig file (which actually makes sense, as we don't want end users fiddling with stuff in the main application folder!), and I was reading the wrong one.

I will, however, change to the new Data Contract way of doing things at the next major application update, when, hopefully, I'll have more time. I'll also consider moving a couple of other settings out of registry at that time as well.

In the meantime, as I do intend to use your suggestion then, I'll mark your answer accepted and I thank you once again for your time and patience.
djdynamix 9-Oct-12 8:32am View    
I'll go through those pages again, Sergey. I guess I'm being a bit impatient because I'm on a deadline. It's also a little exasperating, given that I already have a solution which works for everything except that one colour setting, and being told, effectively, that I need to start again "from the ground up" to accomodate it.

Thanks for your time and patience.
djdynamix 8-Oct-12 20:53pm View    
Thanks Espen. I've had a quick scan, and I think the information I need will probably be in there somewhere. I'm going to download the accompanying code and read through the article properly. The problem I've found with this subject is that most of the XML information out there is "bloated", with "Data Grid Views" and all sorts of database and dataset calls which I simply don't need. I just wish someone would put a tutorial out there which just simply explains how to do with XML what we used to do with INI files and nothing more. To be honest, if I'd known it was going to be this convoluted, I'd just have stuck a few keys and values in the registry and written the text to a .TXT file!
djdynamix 8-Oct-12 20:27pm View    
Sorry, both of you, but you're not being terribly helpful with comments like that. I'm not a complete noobie. On the contrary, I've completed several advanced projects in VB.Net, including multi-threaded apps and Windows Services. I am, however, a bit "behind the times" when it comes to stuff like XML. (I always relied on INI files, which are apparently now obsolete. I don't need "beginners' guides to programming", I just need to know, in terminology I can understand, a) What is a Data Contract? b) Why is Serialization an issue in XML, and c) How does any of this help me to store my users'`preferences? I'm afraid the MSDN documentation is way too over-complicated and seems to rely on the reader being familiar with half-a-dozen other long and complex documents relating to other parts of the XML language which I don't need to know and will never use.

All I need to do is save 4 user preferences and a text string in some sort of settings file in a way which is not due to become obsolete in the next couple of incarnations of the .Net Framework!
djdynamix 8-Oct-12 17:16pm View    
Thank you for your suggestions, Sergey. I'm relatively new to Object Oriented programming, so I'm finding some of the terminology a bit confusing. Could you possibly point me to something a bit more "for dummies" about Data Contracts and Serialization? Is there something like a simple "how to" guide on how to create and read those kinds of XML files, without having to wade through MSDN? Thanks.