I have a 3rd party library I am working with and have no access to change it. It has a property on one of its components that only accepts a ThirdPartyList<T>(IList<T> items)
, but at the point I am about to set the property I have only an IEnumerable
.
I can figure out what the type is going to be in my IEnumerable
by looking at the first item and figuring it out with reflection and all the items in the IEnumerable
will be of the same type, but the question is how do I turn that type into a new ThirdPartyList<what do I put here>()
.
Thanks
CD