I know that Linq offers the ToDictionary(key, value) method, and I'm sure there's a way to be able to do what I'm trying to achieve but I can't quite figure it out.
I have two arrays, the first being conditionalIds, which is simply an int[] that stores a number of Ids, the second array is a string[] called conditionalAnswers. I essentially want to combine and map these two arrays so that each of the Ids stores in conditionalIds maps to the correct answer.
var conditionalIds = _currentRuleSet.MultiConditionalQuestionIds;
var conditionalAnswers = _currentRuleSet.MultiConditionalQuestionAnswers;
var map = conditionalAnswers.ToDictionary(conditionalIds, x => x[]);
However I'm not sure how to structure the Linq query to achieve this.