public ArchiveDocumentType? FindApproximation(string line) { var item = new ApproximationItem(ArchiveDocumentType.Other, line); var foundProximity = 0.5; ApproximationItem foundItem = null; foreach (var approximationItem in Basis) { var proximity = item.FindProximity(approximationItem); if (proximity > foundProximity) { foundProximity = proximity; foundItem = approximationItem; } } return foundItem != null ? foundItem.Type : default(ArchiveDocumentType?); }