What could be a LINQ equivalent to the following code?
string[] values = { \"1\", \"hello\", \"true\" }; Type[] types = { typeof(int), typeof(string), typeof(b
Assuming both arrays have the same size:
string[] values = { "1", "hello", "true" }; Type[] types = { typeof(int), typeof(string), typeof(bool) }; object[] objects = values .Select((value, index) => Convert.ChangeType(value, types[index])) .ToArray();