private void InitializeCodeTable(int codeTableSize) { CodeTable.Clear(); for (var i = 0; i < codeTableSize; i++) { CodeTable.Add(i, new List <int>() { i }); } CodeTable[codeTableSize] = new List <int>() { codeTableSize }; CodeTable[codeTableSize + 1] = new List <int>() { codeTableSize + 1 }; }