private static void SynchroniseValueWithIndex(DomainUpDown updown, object newValue) { if (updown == null || updown.Items == null) { return; } int i = 0; foreach (var element in updown.Items) { if (element.Equals(newValue)) { updown.SelectedIndex = i; break; } i++; } }
private static void SynchroniseValueWithIndex(DomainUpDown updown, object newValue) { if (updown == null || updown.Items == null) return; int i = 0; foreach (var element in updown.Items) { if (element.Equals(newValue)) { updown.SelectedIndex = i; break; } i++; } }