hello, im just a newbie in using C# language. Im creating a CASE Tool. We all know that case tool has Open and Save buttons that can save its own file.How to save values of variables to a filename and save it in the computer??? Then the saved file later be opened using the program then load the values to restore the last setting..
please. help...thanx in advance
Loading
Mike GoldPosted Aug 6, 2007, 4:58 PM
Well you've taken on a huge project, but I wish you luck. Having created a CASE Tool in the past, my advice is to take it slow in small phases. Don't try to bite off everything at once.
Your best strategy to loading/saving info for persistence in a case tool file is to use .NET's serialization features (man, I wish I had these features when I originally created a CASE Tool). You can use these features to serialize entire objects out to a file. You can also either implement in binary or Xml format.
MFC used to have the serialization feature(CArchive), but .NET's is much more sophisticated and yet easier to use.
Be careful when you create Load/Save in your case tool to implement versioning. Otherwise, any new object you add to your CASE tool will render previous versions incompatible.