Re: XMLSerialization - continued
Adam Sills <[email protected]> Thu, 19 Jul 2007 09:33:15 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
I don't think there's necessarily anything wrong with it. I think there's a bit of a conflict of interest there depending upon your design: will all clients want to serialize using your method or could a client perhaps want to do its own thing? If this is private code to your own application that will only be used internally, I think it's up to whether you want the convenience of [MyClass].Serialize and [MyClass].Deserialize methods. Do you plan on unit testing this code? Do you mind that you now have a class that perhaps spans two purposes (doing whatever the class is meant to do in the first place, and providing serialization mechanism)? Adam.. -----Original Message----- From: Discussion relating to the specifics of the C# and Managed C++ languages [mailto:[email protected]] On Behalf Of Peter Osucha Sent: Wednesday, July 18, 2007 9:40 PM To: [email protected] Subject: [DOTNET-CX] XMLSerialization - continued What do you guys think about including a static method in a specific class to Serialize and Deserialize that object? It seems like something reasonable to do. It would 'contain' the code in that class. However, perhaps there is something wrong with this train of thought... =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com