471,348 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

New .Net 2.0 Version Tolerant Serialization

I am trying to work with VTS and was looking at the example provided by MSDN
docs

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxsamples/html/2a183664-bfbf-4ff0-96f6-c836284ea916.htm

For some reason when I comment out the OptionalField attribute for the _age
field in the V2 application, a deserialazation exception is not being thrown
when it is run.

Can someone tell me why?

Thanks,

Dennis
Dec 4 '05 #1
4 1654
Hi Dennis,

Welcome to MSDN newsgroup.
As for this binary deserializing with VTS model question, we'll peform some
tests on our side and will update you as soon as possible.
Thanks for your understanding....

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Dennis C. Drumm" <dc******@community.nospam>
| Subject: New .Net 2.0 Version Tolerant Serialization
| Date: Sun, 4 Dec 2005 13:20:57 -0500
| Lines: 16
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <#5**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: vsat-148-63-14-234.c001.g4.mrt.starband.net
148.63.14.234
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.languages.csharp:369299
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I am trying to work with VTS and was looking at the example provided by
MSDN
| docs
|
|
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxsamples/html/2
a183664-bfbf-4ff0-96f6-c836284ea916.htm
|
| For some reason when I comment out the OptionalField attribute for the
_age
| field in the V2 application, a deserialazation exception is not being
thrown
| when it is run.
|
| Can someone tell me why?
|
| Thanks,
|
| Dennis
|
|
|

Dec 5 '05 #2
Hi Dennis,

I downloaded VTS and comment out the OptionalField attribute. And I can
reproduce this. Based on my research, this behavior is by design. It was
added at the RTM build in order not to deviate from the .NET framework 1.1
behavior.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 6 '05 #3
Thanks Kevin,

That raises a few more questions.

First, for versioning, do we still need to use the OptionalField attribute
for fields in prior versions that will no longer be serialized and do we
need to use it for new fields that will now be serialized that don't show up
in older versions?

And if we do need to use the OptionalField attribute for those fields, then
what are the consequences of not using it?

Thanks,

Dennis


"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:cF*****************@TK2MSFTNGXA02.phx.gbl...
Hi Dennis,

I downloaded VTS and comment out the OptionalField attribute. And I can
reproduce this. Based on my research, this behavior is by design. It was
added at the RTM build in order not to deviate from the .NET framework 1.1
behavior.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 6 '05 #4
Hi Dennis,

In .NET 2.0, we are encouraged to use the OptionalField attribute for the
fields you have mentioned. The exceptions are not thrown, because of the
backward compatibility issues. I think in the future versions of .NET
framework, the rules will be more strict in serialization.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 7 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Keith | last post: by
2 posts views Thread by Joe Reazor | last post: by
5 posts views Thread by Lee Alexander | last post: by
2 posts views Thread by Rohith | last post: by
1 post views Thread by Dennis C. Drumm | last post: by
3 posts views Thread by =?Utf-8?B?TWFydGluIEtvY2g=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.