Update Array.h added IsValidIndex

This commit is contained in:
NoriteSC
2024-01-13 17:32:07 +01:00
parent 1094abce5a
commit 64e3db3a98

View File

@@ -737,7 +737,18 @@ public:
::Swap(other, *this);
}
}
/// <summary>
/// Determines if is valid index.
/// </summary>
/// <param name="index">The index.</param>
/// <returns>
/// <c>true</c> if is valid a index; otherwise, <c>false</c>.
/// </returns>
bool IsValidIndex(int index) const
{
return index < _count && index >= 0;
}
/// <summary>
/// Reverses the order of the added items in the collection.
/// </summary>