MonobjcMonobjc Documented Class Library
SortDescriptorWithKeyAscendingSelector Method (key, ascending, selector)
NamespacesMonobjc.FoundationNSSortDescriptorSortDescriptorWithKeyAscendingSelector(NSString, Boolean, IntPtr)

Creates an NSSortDescriptor with the specified ordering and comparison selector.

Original signature is '+ (id)sortDescriptorWithKey:(NSString *)key ascending:(BOOL)ascending selector:(SEL)selector'

Available in Mac OS X v10.6 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSSortDescriptor SortDescriptorWithKeyAscendingSelector(
	NSString key,
	bool ascending,
	IntPtr selector
)
Public Shared Function SortDescriptorWithKeyAscendingSelector ( _
	key As NSString, _
	ascending As Boolean, _
	selector As IntPtr _
) As NSSortDescriptor
public:
static NSSortDescriptor^ SortDescriptorWithKeyAscendingSelector(
	NSString^ key, 
	bool ascending, 
	IntPtr selector
)
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.
selector (IntPtr)
The method to use when comparing the properties of objects, for example caseInsensitiveCompare: or localizedCompare:. The selector must specify a method implemented by the value of the property identified by keyPath. The selector used for the comparison is passed a single parameter, the object to compare against self, and must return the appropriate NSComparisonResult constant. The selector must have the same method signature as:
Return Value
An NSSortDescriptor object initialized with the property key path specified by keyPath, sort order specified by ascending, and the selector specified by selector.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later)

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