UniversalComparer(T) Constructor
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Initializes a new instance of the UniversalComparerT class.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public UniversalComparer( string orderBy )
Public Sub New ( orderBy As String ) Dim orderBy As String Dim instance As New UniversalComparer(orderBy)
public: UniversalComparer( String^ orderBy )
new : orderBy : string -> UniversalComparer
Parameters
- orderBy
- Type: SystemString
The sort criteria used when comparing objects. This criteria is similar to the string that you would use with the ORDER BY clause in an SQL statement. The names used in the criteria are the names of properties of the object followed by 'DESC' or 'ASC' to specify sort order (ascending is the default if not specified). Multiple properties are separated by commas. For example: "LastName, FirstName" or "LastName DESC, FirstName ASC".
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The orderBy parameter is or empty. |
| ArgumentException | One of the property names in the specified orderBy parameter could not be found. |
Remarks
Creates a new instance of the UniversalComparerT class for
the specified type of object and sorting criteria.