MTConnectSharp icon indicating copy to clipboard operation
MTConnectSharp copied to clipboard

DataItem.PreviousSample returns Current Sample

Open MattCosturos opened this issue 6 years ago • 0 comments

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

MattCosturos avatar Nov 27 '19 16:11 MattCosturos