Я не уверен, что понимаю вопрос / контекст.
Подойдет ли вам словарь?
internal static class Foo
{
internal static Dictionary<TKey, TValue> Combine<TKey, TValue>
( IList<TKey> keys, IList<TValue> values )
{
var dictionary = new Dictionary<TKey, TValue>();
// write your own 'combination' code...
for (int i = 0; i < keys.Count && i<values.Count; i++)
{
dictionary.Add(keys[i], values[i]);
}
return dictionary;
}
}
private static void Main(string[] args)
{
// collection initialization and var: .NET 3.0 or higher
var keys = new List<int> {1, 2, 3, 5, 6, 7, 8, 10, 15, 99};
var values = new List<string> {"one", "two", "tree", "four"};
var combinded = Foo.Combine<int, string>(keys, values);
foreach (KeyValuePair<int, string> keyValuePair in combinded)
{
int key = keyValuePair.Key;
string value = keyValuePair.Value;
}
}