Click here to Skip to main content
15,887,341 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: DevExpress Ribbon Pin
Dave Kreskowiak28-Mar-13 2:02
mveDave Kreskowiak28-Mar-13 2:02 
AnswerRe: DevExpress Ribbon Pin
Vasudevan Deepak Kumar29-Mar-13 6:23
Vasudevan Deepak Kumar29-Mar-13 6:23 
QuestionHow to Identify .Net Dll's/Assemblies from Project supporting all Dll types? Pin
Vishal_K8927-Mar-13 1:43
Vishal_K8927-Mar-13 1:43 
GeneralRe: How to Identify .Net Dll's/Assemblies from Project supporting all Dll types? Pin
Richard MacCutchan27-Mar-13 3:50
mveRichard MacCutchan27-Mar-13 3:50 
AnswerRe: How to Identify .Net Dll's/Assemblies from Project supporting all Dll types? Pin
jschell27-Mar-13 8:53
jschell27-Mar-13 8:53 
QuestionHow make steganography in video (.AVI) Pin
Khairul Imam25-Mar-13 11:40
Khairul Imam25-Mar-13 11:40 
AnswerRe: How make steganography in video (.AVI) Pin
Dave Kreskowiak25-Mar-13 12:51
mveDave Kreskowiak25-Mar-13 12:51 
QuestionSerialization and object versioning Pin
Abyss25-Mar-13 9:48
Abyss25-Mar-13 9: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 | :)
Thanks,
Abyss
SuggestionRe: Serialization and object versioning Pin
Matt T Heffron25-Mar-13 10:55
professionalMatt T Heffron25-Mar-13 10:55 
GeneralRe: Serialization and object versioning Pin
Abyss25-Mar-13 20:04
Abyss25-Mar-13 20:04 
AnswerRe: Serialization and object versioning Pin
AContractor2-Apr-13 15:45
professionalAContractor2-Apr-13 15:45 
QuestionUsing JTABLE in MVC Pin
Member 868327723-Mar-13 23:29
Member 868327723-Mar-13 23:29 
AnswerRe: Using JTABLE in MVC Pin
Richard MacCutchan24-Mar-13 2:27
mveRichard MacCutchan24-Mar-13 2:27 
AnswerRe: Using JTABLE in MVC Pin
Vasudevan Deepak Kumar29-Mar-13 6:24
Vasudevan Deepak Kumar29-Mar-13 6:24 
QuestionMCSD or MCPD?? Pin
frostcox22-Mar-13 5:09
frostcox22-Mar-13 5:09 
AnswerRe: MCSD or MCPD?? Pin
Simon_Whale22-Mar-13 5:19
Simon_Whale22-Mar-13 5:19 
GeneralRe: MCSD or MCPD?? Pin
frostcox22-Mar-13 5:37
frostcox22-Mar-13 5:37 
AnswerRe: MCSD or MCPD?? Pin
Abhinav S22-Mar-13 16:44
Abhinav S22-Mar-13 16:44 
GeneralRe: MCSD or MCPD?? Pin
frostcox23-Mar-13 0:19
frostcox23-Mar-13 0:19 
QuestionWindows Explorer Pin
baharan2021-Mar-13 10:59
baharan2021-Mar-13 10:59 
AnswerRe: Windows Explorer Pin
dusty_dex21-Mar-13 11:09
dusty_dex21-Mar-13 11:09 
GeneralRe: Windows Explorer Pin
baharan2021-Mar-13 11:15
baharan2021-Mar-13 11:15 
AnswerRe: Windows Explorer Pin
R. Giskard Reventlov21-Mar-13 11:24
R. Giskard Reventlov21-Mar-13 11:24 
GeneralRe: Windows Explorer Pin
baharan2021-Mar-13 11:34
baharan2021-Mar-13 11:34 
GeneralRe: Windows Explorer Pin
R. Giskard Reventlov21-Mar-13 11:47
R. Giskard Reventlov21-Mar-13 11:47 

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.