public DetectionResults(ProcessingTextBlock[] result, ProcessingTextBlock[] anomaly) { Anomaly = anomaly ?? throw new ArgumentNullException(nameof(anomaly)); Result = result ?? throw new ArgumentNullException(nameof(result)); var anomalyLookup = Anomaly.SelectMany(item => item.Sentences).ToLookup(item => item); for (int i = 0; i < Result.Length; i++) { Result[i] = new ProcessingTextBlock(Result[i].Sentences.Where(item => !anomalyLookup.Contains(item)).ToArray()); } }