private void Compute() { if (!IsValidInput) { return; } OutputValue = InputValue * Currencies.AsParallel().First(i => i.id == InputCurrencyId).rate / Currencies.AsParallel().First(i => i.id == OutputCurrencyId).rate; }