Method SkipTo
SkipTo(Int32)
Skips to the first match beyond the current, whose document number is greater than or equal to target.
The behavior of this method is undefined when called with
target <= current
, or after the iterator has exhausted.
Both cases may result in unpredicted behavior.
Returns true
if there is such
a match.
Behaves as if written:
bool SkipTo(int target)
{
do
{
if (!Next())
return false;
} while (target > Doc);
return true;
}
Most implementations are considerably more efficient than that.
Declaration
public abstract bool SkipTo(int target)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | target |
Returns
Type | Description |
---|---|
System.Boolean |