private bool TryGetValue(Csv table, string valueA, string valueB, out string value) { int aIndex = table.ColumnIndex(CategoryAName); if (aIndex <= 0) { throw new Exception(); } int bIndex = table.ColumnIndex(CategoryBName); if (bIndex <= 0) { throw new Exception(); } for (int recordIndex = 0; recordIndex < table.Records.Count; recordIndex++) { List<string> record = table.Records[recordIndex]; string recordValueA = record[aIndex]; string recordValueB = record[bIndex]; if (recordValueA == valueA && recordValueB == valueB) { int valueIndex = table.ColumnIndex(ValueVariableName); if (valueIndex <= 0) { throw new Exception(); } value = record[valueIndex]; return true; } } value = null; return false; }