473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Serialiazation/Reflection problems

Hi,

I'm trying to build a gerenic routine which deals with versioning problems
between serailized objects. All my objects are Serialized into a SQL
server DB, but I need to make changes to the object tree and also make
future changes easier.

I'm using custom serialization and reflection and I think I'm getting there,
but I have a wierd problem. I've extracted all the properties from the
object in question and passed the info to the following VB routine. It's
working fine until it encounters an invalid member in the serializationinfo
(which is expected - it's a newly added property in my object), but after
that it never recovers - from that point on I'm getting a
serializationexeption (member <name> not found) for each subsequent property
even when the member definitely exists in the serializationinfo. This only
happens AFTER the expected error, until then it's fine.

Any clues?

Thanks,
Russ

Private Shared Function CopyObject(ByVal Info As SerializationInfo, ByVal
PI() As PropertyInfo, ByRef O As Object)
Dim P As PropertyInfo
For Each P In PI
Try
P.SetValue(O, Info.GetValue(P.Name, P.PropertyType), Nothing)
Catch ex As Exception

End Try
Next
Return O
End Function
Nov 22 '05 #1
2 1822
Hi Russ,

We have reviewed this issue and someone has replied to your post on another
thread in microsoft.public.dotnet.framework.

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

Nov 22 '05 #2
Hi Russ,

We have reviewed this issue and someone has replied to your post on another
thread in microsoft.public.dotnet.framework.

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

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Russ | last post by:
Hi, I'm trying to build a gerenic routine which deals with versioning problems between serailized objects. All my objects are Serialized into a SQL server DB, but I need to make changes to the...
2
by: UJ | last post by:
Can somebody point me to an explanation of what Reflection is? I've tried looking in the help and it's not very helpful. TIA - Jeff.
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
2
by: Carl Rosenberger | last post by:
Hi all, I would like to create an instance of a struct with reflection. The way I am used to doing this with classes: - get a ConstructorInfo from the Type - call Invoke() However, if a...
5
by: Wiktor Zychla | last post by:
Hello, I still have some problems with custom attributes and I ask someone for a helpful hand. In the appendix is the trivial ILAsm code with single custom attribute. The code compiles OK but...
8
by: Rachel Suddeth | last post by:
I'm trying to use reflection to create an object at runtime where the type is given by a string. I thought we should be able to do that, but so far it's not working. I'm trying to work on...
2
by: brianlanning | last post by:
I'm trying to write a function that can reliably know the name of the calling method. I've figured out how to do this: string methodname = (new StackTrace()).GetFrame(1).GetMethod().Name; ...
15
by: satankidneypie | last post by:
Hi, I'm going to start this off with some code as it'll make it easier to explain afterwards... using System; namespace ConsoleApplication1 { /// <summary>
2
by: Wiktor Zychla [C# MVP] | last post by:
Could anyone confirm/deny that following is a bug (or at least an "unexpected behaviour")? If this is not a bug, I would be glad for a short explanation or a workaround. Issue: A generic...
2
by: Jason | last post by:
Hello, I"m trying to invoke a method using reflection on a DLL that is already within a project. However, I"m having a few problems and didn't know if anyone has any bright ideas. Please note,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.