How do I go about converting a reflection.propertyinfo[] to a generic.list<>?
C# convert reflection.propertyinfo to Generic.List<>
2.7k views Asked by mattgcon At
5
There are 5 answers
0
On
All of the above are correct. But it should also be mentioned that, like List<T>
all .net arrays implement IList<T>
.
var IList<PropertyInfo> ilist = reflection.propertyinfo;
Since I know that, almost all my functions accept IList<T>
when I need a list-like collection, which I can use with traditional arrays and lists.