Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

NumericStringComparer(T) Class

  • Last UpdatedNov 18, 2025
  • 3 minute read
NumericStringComparer(T) Class
Represents a numeric string comparison operation that uses special case-insensitive comparison rules for strings with numeric values.

Inheritance Hierarchy

SystemObject
  System.Collections.GenericComparerT
    OSIsoft.AFNumericStringComparerT

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public sealed class NumericStringComparer<T> : Comparer<T>
Public NotInheritable Class NumericStringComparer(Of T)
	Inherits Comparer(Of T)

Dim instance As NumericStringComparer(Of T)
generic<typename T>
public ref class NumericStringComparer sealed : public Comparer<T>
[<SealedAttribute>]
type NumericStringComparer<'T> =  
    class
        inherit Comparer<'T>
    end

Type Parameters

T
The type of objects to compare.

The NumericStringComparerT type exposes the following members.

Constructors

  NameDescription
Public method
NumericStringComparerT
Initializes a new instance of the NumericStringComparerT class which sorts in ascending order.
Public method
NumericStringComparerT(Boolean)
Initializes a new instance of the NumericStringComparerT class which allows the sort order to be specified.

Methods

  NameDescription
Public method
Compare
Compares two objects and returns an indication of their relative sort order.
(Overrides ComparerTCompare(T, T).)
Public method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
ToString
Returns a string that represents the current object.
(Inherited from Object.)

Remarks

The numeric string comparison operation will sort strings containing numeric values using a numeric compare. Instead of the alpha-numeric order of A1, A10, A11, A2, the order would be A1, A2, A10, A11.
Caution note Caution
This sort may produce unexpected results when the NumberFormatInfo of the current culture is configured to use multiple characters for the NumberDecimalSeparator, NumberGroupSeparator, PositiveSign, or NegativeSign properties.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in