Click here to Skip to main content

.NET Framework

AnswerRe: DevExpress Ribbon PinmvpDave Kreskowiak28-Mar-13 3:02 
AnswerRe: DevExpress Ribbon PinmemberVasudevan Deepak Kumar29-Mar-13 7:23 
QuestionHow to Identify .Net Dll's/Assemblies from Project supporting all Dll types? PinmemberVishal_K8927-Mar-13 2:43 
GeneralRe: How to Identify .Net Dll's/Assemblies from Project supporting all Dll types? PinmvpRichard MacCutchan27-Mar-13 4:50 
AnswerRe: How to Identify .Net Dll's/Assemblies from Project supporting all Dll types? Pinmemberjschell27-Mar-13 9:53 
QuestionHow make steganography in video (.AVI) PinmemberKhairul Imam25-Mar-13 12:40 
AnswerRe: How make steganography in video (.AVI) PinmvpDave Kreskowiak25-Mar-13 13:51 
QuestionSerialization and object versioning PinmemberAbyss25-Mar-13 10:48 
If I want to serialize an object I have to use [Serializable] attribute and all member variables will be written to the file. What I don't know how to do versioning e.g. if I add a new member variable (rename a variable or just remove a variable) to the object e.g. m_dRadius and then I open (deserialize) the file how can I determine that the variable was initialized during the load or not.

I know that there are version tolerant approaches and I can mark variables with [OptionalField(VersionAdded = 1)] attribute. If I open an old file the framework will ignore this optional (new variable) and it will be just zero/null. But again how can I determine if the variable is initialized by load to zero or it was ignored.

I can write the class/object version number to the stream. Use the ISerializable approach and in the constructor(SerializationInfo oInfo, StreamingContext context) method read this version number. This will exactly tell me what is the class version in the stream.

However I expected that such kind of versioning is already implemented by the streaming framework. I tried to obtain the Assembly version from the SerializationInfo but it is always set to current version not to the version which was used when the object was saved.

What is the preferred approach? I found a lot of articles on the net, but I could not find a good solution for this...

Any help is appreciated Smile | Smile | :)
SuggestionRe: Serialization and object versioning PinmemberMatt T Heffron25-Mar-13 11:55 
GeneralRe: Serialization and object versioning PinmemberAbyss25-Mar-13 21:04 
AnswerRe: Serialization and object versioning PinprofessionalAContractor2-Apr-13 16:45 
QuestionUsing JTABLE in MVC PinmemberMember 868327724-Mar-13 0:29 
AnswerRe: Using JTABLE in MVC PinmvpRichard MacCutchan24-Mar-13 3:27 
AnswerRe: Using JTABLE in MVC PinmemberVasudevan Deepak Kumar29-Mar-13 7:24 
QuestionMCSD or MCPD?? [modified] PinmemberMickt198522-Mar-13 6:09 
AnswerRe: MCSD or MCPD?? PinmemberSimon_Whale22-Mar-13 6:19 
GeneralRe: MCSD or MCPD?? PinmemberMickt198522-Mar-13 6:37 
AnswerRe: MCSD or MCPD?? PinmvpAbhinav S22-Mar-13 17:44 
GeneralRe: MCSD or MCPD?? PinmemberMickt198523-Mar-13 1:19 
QuestionWindows Explorer Pinmemberbaharan2021-Mar-13 11:59 
AnswerRe: Windows Explorer Pinmemberdusty_dex21-Mar-13 12:09 
GeneralRe: Windows Explorer Pinmemberbaharan2021-Mar-13 12:15 
AnswerRe: Windows Explorer Pinmembermark merrens21-Mar-13 12:24 
GeneralRe: Windows Explorer Pinmemberbaharan2021-Mar-13 12:34 
GeneralRe: Windows Explorer Pinmembermark merrens21-Mar-13 12:47 

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

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

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 28 Feb 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid