Re: Reflection: Order of fields guaranteed?

2016-10-22 Thread Michael Coulombe via Digitalmars-d-learn
On Friday, 21 October 2016 at 01:51:44 UTC, Stefan Koch wrote: On Friday, 21 October 2016 at 01:34:44 UTC, Nick Sabalausky wrote: When using reflection to obtain the fields of a class/struct, is there any guarantee that the order is the same as the order the fields are defined? Yes they

Re: Reflection: Order of fields guaranteed?

2016-10-21 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 21 October 2016 at 01:34:44 UTC, Nick Sabalausky wrote: When using reflection to obtain the fields of a class/struct, is there any guarantee that the order is the same as the order the fields are defined? Yes they should always come in lexical order.

Reflection: Order of fields guaranteed?

2016-10-21 Thread Nick Sabalausky via Digitalmars-d-learn
When using reflection to obtain the fields of a class/struct, is there any guarantee that the order is the same as the order the fields are defined?