TechTalk Genome v4.2

Set.GetRange Method (Int32, Int32, GetRangeMethod, String, Object[])

Returns a Set containing a range of elements in the source Set using element indexing order established by the specified OQL order clause.

public Set GetRange(
   int first,
   int count,
   GetRangeMethod hintedMethod,
   string orderBy,
   params object[] parameters


The zero-based index in the source Set.
The number of elements in the range starting from first.
A value specifying which query building method should be used to compute the query of the resulting Set.
An OQL order clause consisting of comma-separated list of one or more OQL expressions and order specifications. The expression may contain zero or more literal parameter references and it can refer to the candidate element of the source Set using the this keyword.
An array of zero or more objects that can be used as literal argument values in orderBy.

Return Value

A Set representing a range of elements in the source Set.


When the set is not ordered by unique fields or expression, items may appear duplicated or disappear from the result between pages.


Exception TypeCondition
OqlParserExceptionorderBy does not denote a valid OQL order clause.

orderBy is not applicable to the element type of the source Set.


orderBy can not be translated to the target SQL language.

SchemaExceptionorderBy contains expressions or features that cannot be translated with the given DataDomainSchema.


Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)


Editions: Professional, Evaluation, Express

See Also

Set Class | TechTalk.Genome Namespace | Set.GetRange Overload List | OrderBy | GetRange