Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralInserting html code on a textbox control Pin
devgeez22-Apr-04 4:36
devgeez22-Apr-04 4:36 
GeneralRe: Inserting html code on a textbox control Pin
devgeez22-Apr-04 5:05
devgeez22-Apr-04 5:05 
GeneralRe: Inserting html code on a textbox control Pin
Heath Stewart22-Apr-04 5:09
protectorHeath Stewart22-Apr-04 5:09 
GeneralRe: Inserting html code on a textbox control Pin
Heath Stewart22-Apr-04 5:09
protectorHeath Stewart22-Apr-04 5:09 
GeneralLoading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:07
professionalSimon Wren22-Apr-04 4:07 
GeneralRe: Loading in old MFC Serialized files Pin
Heath Stewart22-Apr-04 4:10
protectorHeath Stewart22-Apr-04 4:10 
GeneralRe: Loading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:18
professionalSimon Wren22-Apr-04 4:18 
GeneralRe: Loading in old MFC Serialized files Pin
Heath Stewart22-Apr-04 4:28
protectorHeath Stewart22-Apr-04 4:28 
If you want to deserialize your old MFC stream, then wouldn't that imply you plan on recreating many of these classes in C# anyway? Also, this MC++ could simply be a conversion program so that the old MFC classes aren't need to run your actual application which requires the deserialized stream.

MFC Serialization is specific to MFC while Runtime Serialization is specific to the Runtime. They work very differently and at the time MFC serialization was designed, something like XML was a pipe-dream. .NET can also use XML Serialization (more basic, but sometimes that's good) and Runtime Serialization using either the binary or SOAP formatters provided in the FCL, or any custom formatter you or someone else could create. It's a very extensible system.

The fact is that they both work very differently.

It would be possible to create, for example, an IFormatter class that could deserialize your MFC stream and maybe even stick with the same schema, but that's quite a bit of work and still requires that you handle the binary stream from your MFC app. If you upgrade to newer technology, change is inevitable or your force to design your app to the lowest common denominator - your old MFC app.

For this new application, you may wish to look at SOAP formatting using Runtime Serialization (more powerful), or simple XML Serialization. This will allow you to easily convert to something else in the future using the XML DOM or transforming it using XSLT. XML is around to stay for quite some time. While it's not always the most compact solution (see discussions on SOAP vs. Binary formatting across remote boundaries), it's definitely extensible.

For more information on these two alternatives, see XML and SOAP Serialization[^] in the .NET Framework SDK.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Loading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:38
professionalSimon Wren22-Apr-04 4:38 
Generals Text Property in a TreeNode Pin
Bill Dean22-Apr-04 3:56
Bill Dean22-Apr-04 3:56 
GeneralRe: s Text Property in a TreeNode Pin
Judah Gabriel Himango22-Apr-04 4:03
sponsorJudah Gabriel Himango22-Apr-04 4:03 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:10
Bill Dean22-Apr-04 4:10 
GeneralRe: s Text Property in a TreeNode Pin
Heath Stewart22-Apr-04 4:14
protectorHeath Stewart22-Apr-04 4:14 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:24
Bill Dean22-Apr-04 4:24 
GeneralRe: s Text Property in a TreeNode Pin
Heath Stewart22-Apr-04 4:30
protectorHeath Stewart22-Apr-04 4:30 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:41
Bill Dean22-Apr-04 4:41 
GeneralCircular Buffer Technique question Pin
TimTM22-Apr-04 3:45
TimTM22-Apr-04 3:45 
GeneralRe: Circular Buffer Technique question Pin
Jeremy Kimball22-Apr-04 5:48
Jeremy Kimball22-Apr-04 5:48 
GeneralRe: Circular Buffer Technique question Pin
TimTM22-Apr-04 8:10
TimTM22-Apr-04 8:10 
GeneralRe: Circular Buffer Technique question Pin
scadaguy22-Apr-04 6:26
scadaguy22-Apr-04 6:26 
GeneralRe: Circular Buffer Technique question Pin
TimTM22-Apr-04 8:04
TimTM22-Apr-04 8:04 
GeneralRe: Circular Buffer Technique question Pin
scadaguy22-Apr-04 8:44
scadaguy22-Apr-04 8:44 
GeneralRe: Circular Buffer Technique question Pin
TimTM22-Apr-04 9:01
TimTM22-Apr-04 9:01 
GeneralWindows Forms DataGrid Pin
dcronje22-Apr-04 3:39
dcronje22-Apr-04 3:39 
GeneralRe: Windows Forms DataGrid Pin
Heath Stewart22-Apr-04 5:04
protectorHeath Stewart22-Apr-04 5:04 

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.