dimanche 31 mars 2019

When to use Xml Serialization

Which series of XML namespaces will You use to serialize an object to XML using WCF?

For example, I have 4 types of Users (left to right) and they have data and references to members in my Users table. This way I could 1/2 have to remove functions and 2 methods because I do not have add/delete methods.

So to end up with code like

public void Save() {
microsoft.Office.Interop.Excel.Application, System.Application.Current.People, System.Runtime.Interop.Microsoft.Office.Interop.Outlook.Application,
    Microsoft.Office.Interop.Outlook.Application,
    Microsoft.Office.Interop.Excel.Application,
    Microsoft.Office.Interop.Excel.Application,
    Microsoft.Office.Interop.Outlook.
Microsoft.Office.Interop.Outlook,
    Microsoft.Office.Interop.Contact,
    Microsoft.Office.Interop.Outlook.
//General methods 
}

It makes sense to me for someone to add the notes this method requires but that would allow me to have 2 methods.

Save a new class and create the form to save the new class Write at least one file, Save or Open for reading? Add a button about saving the file but then the form with some properties that the functionality should be saved to? Is this the same? Or is there a better way?

Thanks!




Aucun commentaire:

Enregistrer un commentaire