gpt4 book ai didi

c# - Type.GetProperties() 是否保证 PropertyInfo[] 结果的特定顺序?

转载 作者:太空狗 更新时间:2023-10-29 20:02:16 25 4
gpt4 key购买 nike

Type.GetProperties() 是否保证其 PropertyInfo[] 结果的特定顺序?例如按属性名称的字母顺序或它们在代码中出现的顺序返回它们。或者顺序未定义?

最佳答案

来自 MSDN :

The GetProperties method does not return properties in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which properties are returned, because that order varies.

关于c# - Type.GetProperties() 是否保证 PropertyInfo[] 结果的特定顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1527901/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com