Skip to content

DataItem.PreviousSample returns Current Sample #3

@MattCosturos

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(); } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions