[Mono-list] Graph of a Class

Dwivedi , Ajay Kumar AjayKumar.Dwivedi@dresdner-bank.com
Sat, 15 Jun 2002 09:13:27 +0100


Hi all,
	I asked a question about the order in which members are serialized
by XmlSerializer on the DOTNET-CLR mailing list. One of the answers is:

> The object is serialized as a graph: starting with the root object, top
> down, fields then properties and *deep* into each field/property.

Can anyone explain how to obtain this graph?

Another answer from "Yann Christensen" (probably from micorsoft) was:

> The answer is that the order is a function of the order of reflection. I
> believe reflection makes no guarantees but in V1 for C# compiled code
> you get fields in order and then properties in order as declared.
> Apparently in VB the declared order and reflection order are not always
> the same.

	Now if this means the order of members returned by
GetType().GetMembers(), this is not entirely correct. The above theory of a
graph looks more appropriate.
	How are we implementing this? What is the order of reflection in
Mono?
 
Happy Hacking,
Ajay