Find the Item in the DOCollection that precedes the Item with the specified UID.
| C# | Visual Basic | Visual C++ |
public DataObject GetPrevious( Guid currentId, ref bool foundCurrent, ref bool atStart )
Public Function GetPrevious ( _ currentId As Guid, _ ByRef foundCurrent As Boolean, _ ByRef atStart As Boolean _ ) As DataObject
public: DataObject^ GetPrevious( Guid currentId, bool% foundCurrent, bool% atStart )
If the Item with UID currentId is not found in the DOCollection, or if it is the first Object in the DOCollection, the method returns a null value. Otherwise, it returns the previous DataObject in the Collection.
This method is used in conjunction with GetNext for navigating DOCollections.
Dim sColl as New StudentCollection
sColl.FindAll()
If sColl.Count > 0 Then
Dim currentStudent As Student = sColl(SColl.Count() - 1)
Dim foundCurrent As Boolean = False
Dim atStart As Boolean = False
Dim previousStudent As Student = sColl.GetPrevious(currentStudent, foundCurrent, atStart)
End If