gpt4 book ai didi

C# 将 reflection.propertyinfo 转换为 Generic.List<>

转载 作者:行者123 更新时间:2023-11-30 19:48:52 26 4
gpt4 key购买 nike

如何将 reflection.propertyinfo[] 转换为 generic.list<>?

最佳答案

List<T> 之一构造函数接受 IEnumerable<T>作为其参数(即您的 PropertyInfo 数组):

var list = new List<PropertyInfo>( propInfoArray );

关于C# 将 reflection.propertyinfo 转换为 Generic.List<>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4878148/

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