MonobjcMonobjc Documented Class Library
SortDescriptorWithKeyAscendingComparator Method (key, ascending, cmptr)
NamespacesMonobjc.FoundationNSSortDescriptorSortDescriptorWithKeyAscendingComparator(NSString, Boolean, Func<(Of <<'(Id, Id, NSComparisonResult>)>>))

Creates and returns an NSSortDescriptor object initialized to do with the given ordering and comparator block.

Original signature is '+ (id)sortDescriptorWithKey:(NSString *)key ascending:(BOOL)ascending comparator:(NSComparator)cmptr'

Available in Mac OS X v10.6 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSSortDescriptor SortDescriptorWithKeyAscendingComparator(
	NSString key,
	bool ascending,
	Func<Id, Id, NSComparisonResult> cmptr
)
Public Shared Function SortDescriptorWithKeyAscendingComparator ( _
	key As NSString, _
	ascending As Boolean, _
	cmptr As Func(Of Id, Id, NSComparisonResult) _
) As NSSortDescriptor
public:
static NSSortDescriptor^ SortDescriptorWithKeyAscendingComparator(
	NSString^ key, 
	bool ascending, 
	Func<Id^, Id^, NSComparisonResult>^ cmptr
)
Parameters
key (NSString)
The property key to use when performing a comparison. In the comparison, the property is accessed using key-value coding (see Key-Value Coding Programming Guide).
ascending (Boolean)
YES if the receiver specifies sorting in ascending order, otherwise NO.
cmptr (Func<(Of <(<'Id, Id, NSComparisonResult>)>)>)
A comparator block.
Return Value
An NSSortDescriptor initialized with the specified key, ordering and comparator.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)