LogRecordSequence.SetLastRecord Method (SequenceNumber)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Sets the last record in the LogRecordSequence.

Namespace:   System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public void SetLastRecord(
	SequenceNumber sequenceNumber


Type: System.IO.Log.SequenceNumber

The new last sequence number in the LogRecordSequence.

This should refer to a current valid record currently in the log.

Exception Condition

sequenceNumber is not valid for this sequence.


A new or existing archive tail or base of the active log is invalid.


sequenceNumber is not between the base and last sequence numbers of this sequence.


The request could not be performed because of an unexpected I/O exception.


The end of the log has been reached.


The specified log file format or version is invalid.


The method was called after the sequence has been disposed of.


There is not enough memory to continue the execution of the program.


Access for the specified log sequence is denied by the operating system.

The specified sequence number must be larger than the base sequence number.

When this method completes, all records that had previously been appended with sequence numbers greater than the specified sequence number are inaccessible.

.NET Framework
Available since 3.0
Return to top