A
A
Alexander Prokopenko2022-02-05 05:28:14
C++ / C#
Alexander Prokopenko, 2022-02-05 05:28:14

How to get the index of the next Span element?

I have a Span with data, I'm looking for an index and doing an operation with the element under this index, but after all the operations I need to do the same with the next element. How can I get the index of the next element?

Here is my code:

var indexData = buffer.IndexOf((byte)Fields.Timestamp);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2022-02-05
@freeExec

var indexData = buffer.IndexOf((byte)Fields.Timestamp, indexData + 1);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question