Skip to content

DataItem.PreviousSample returns Current Sample #3

Description

@MattCosturos

Need to skip Count-2 instead of Count-1.
If you skip Count-1 you get to the end of the list and return a default (blank) sample

public DataItemSample PreviousSample { get { return _dataItemSamples.Skip(Math.Max(1, _dataItemSamples.Count - 2)).FirstOrDefault(); } }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions