是否有在 ObservableCollection 中查找数字范围的函数?

Is there a function to find range of numbers within a ObservableCollection?

目前我要查找特定值:

MyClass myclass = MyObservableList.FirstOrDefault(x => x.value == 5.54m);

但是我希望能够设置边距,而不是仅仅寻找 5.54m,我希望它在 5.53-5.55 的范围内。有简单的方法吗?

试试这个:

MyClass myclass =
    MyObservableList
        .Where(x => x.value >= 5.53m)
        .Where(x => x.value < 5.55m)
        .FirstOrDefault();