public TypeListCache(string initialAssemblyName, string initialTypeName) { AssemblyIndex = System.Array.FindIndex(AssemblyNameList, _e => _e == initialAssemblyName); if (AssemblyIndex == -1) { AssemblyIndex = 0; } TypeIndex = TypeList.Zip(Enumerable.Range(0, TypeList.Count()), (_t, _i) => (type: _t, index: _i)) .Where(_p => _p.type.FullName == initialTypeName) .Select(_p => _p.index) .FirstOrDefault(); }