'Passing dynamic Type at runtime in Array.ConvertAll
Is it possible to pass Dynamic Type in Array.ConvertAll? in the below code instead of Int32.Parse I tried passing or is there any other way to convert my array of values to another data type
var criteria = Array.ConvertAll(filter.Value, Int32.Parse);
MemberExpression member = Expression.Property(param, filter.Name);
var propertyType = ((PropertyInfo)member.Member).PropertyType;
var criteria = Array.ConvertAll(filter.Value, propertyType); // Gives error
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
