Click here to Skip to main content
15,922,650 members
Home / Discussions / C#
   

C#

 
GeneralRe: I need some help here Pin
Dave Kreskowiak12-Apr-06 6:09
mveDave Kreskowiak12-Apr-06 6:09 
QuestionLDAP Pin
AnhTin12-Apr-06 0:32
AnhTin12-Apr-06 0:32 
QuestionLDAP help me Pin
AnhTin12-Apr-06 0:26
AnhTin12-Apr-06 0:26 
AnswerRe: LDAP help me Pin
Ravi Bhavnani12-Apr-06 5:01
professionalRavi Bhavnani12-Apr-06 5:01 
Questionhow to detect disconnect event Pin
hafz12-Apr-06 0:05
hafz12-Apr-06 0:05 
AnswerRe: how to detect disconnect event Pin
Michael P Butler12-Apr-06 2:05
Michael P Butler12-Apr-06 2:05 
QuestionHow to intercept incoming call ?? Pin
rohitgraycell11-Apr-06 23:58
rohitgraycell11-Apr-06 23:58 
QuestionDesktop/Mobile Serialization Pin
8thWonder11-Apr-06 23:47
8thWonder11-Apr-06 23:47 
Hi,

I have a class hierarchy of objects representing typical stuff like employees, users, addresses and so on. I've defined the relationships, created a database and now want to add serialization. The top-most class is an abstract one, kind of like CObject I suppose and my objects may exist on a desktop or mobile platform.

I started to implement custom serialization but the Compact Framework doesn't support it so now I have to write my own stuff. What I'm looking for is some ideas as to how best to implement serialization for my system. Typically, each object will need to be serialized to/from my database and to/from a web service so I'm guessing I just need to write some methods to serialize to XML and/or to a MemoryStream object.

OK, assuming that's the way to implement the actual serialization, how best to define it within my hierarchy? I was thinking of two virtual methods, toXML() and fromXML() defined withing my top-most class and an abstract method called getObjectData() which all descendents *must* implement.

toXML();
toMS();
getObjectData();


Within toXML() and toMS(), there's a call to getObjectData() which gets the object data ready to be formatted into a MemoryStream object or XML.

Each object would also implement a constructor accepting an XML or MemoryStream object but I'm very new to C# so I don't know if there's a way of forcing derived classes to implement these constructors or whether I "should" or not.

What do you think? Any help much appreciated including book/article suggestions Smile | :)
QuestionHow to compress a byte array? Pin
bouli11-Apr-06 23:27
bouli11-Apr-06 23:27 
AnswerRe: How to compress a byte array? Pin
alexey N12-Apr-06 1:32
alexey N12-Apr-06 1:32 
QuestionPractical Cryptography Pin
Trance Junkie11-Apr-06 23:21
Trance Junkie11-Apr-06 23:21 
Question"&" character in Visual Studio Pin
AesopTurtle11-Apr-06 22:53
AesopTurtle11-Apr-06 22:53 
AnswerRe: "&" character in Visual Studio Pin
alexey N11-Apr-06 22:58
alexey N11-Apr-06 22:58 
AnswerRe: "&" character in Visual Studio Pin
shaluhyd12-Apr-06 3:26
shaluhyd12-Apr-06 3:26 
AnswerRe: "&" character in Visual Studio Pin
alexey N17-Apr-06 1:46
alexey N17-Apr-06 1:46 
QuestionUltra WebGrid Hyperlink Pin
cppdotnet11-Apr-06 22:10
cppdotnet11-Apr-06 22:10 
AnswerRe: Ultra WebGrid Hyperlink Pin
Scott Hanslip12-Apr-06 7:43
Scott Hanslip12-Apr-06 7:43 
GeneralRe: Ultra WebGrid Hyperlink Pin
cppdotnet12-Apr-06 8:10
cppdotnet12-Apr-06 8:10 
QuestionMaximized form without border, not in fullscreen mode Pin
loutremaline11-Apr-06 21:36
loutremaline11-Apr-06 21:36 
AnswerRe: Maximized form without border, not in fullscreen mode Pin
alexey N11-Apr-06 23:25
alexey N11-Apr-06 23:25 
GeneralRe: Maximized form without border, not in fullscreen mode Pin
loutremaline12-Apr-06 1:19
loutremaline12-Apr-06 1:19 
GeneralRe: Maximized form without border, not in fullscreen mode Pin
alexey N12-Apr-06 17:44
alexey N12-Apr-06 17:44 
GeneralRe: Maximized form without border, not in fullscreen mode Pin
loutremaline12-Apr-06 20:57
loutremaline12-Apr-06 20:57 
GeneralRe: Maximized form without border, not in fullscreen mode Pin
alexey N12-Apr-06 22:44
alexey N12-Apr-06 22:44 
GeneralRe: Maximized form without border, not in fullscreen mode Pin
loutremaline12-Apr-06 22:56
loutremaline12-Apr-06 22:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.