MonobjcMonobjc Documented Class Library
NSSortDescriptor Constructor (keyPath, ascending, selector)
NamespacesMonobjc.FoundationNSSortDescriptorNSSortDescriptor(NSString, Boolean, IntPtr)

Returns an NSSortDescriptor object initialized with a given property key path, sort order, and comparison selector.

Original signature is '- (id)initWithKey:(NSString *)keyPath ascending:(BOOL)ascending selector:(SEL)selector'

Available in Mac OS X v10.3 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSSortDescriptor(
	NSString keyPath,
	bool ascending,
	IntPtr selector
)
Public Sub New ( _
	keyPath As NSString, _
	ascending As Boolean, _
	selector As IntPtr _
)
public:
NSSortDescriptor(
	NSString^ keyPath, 
	bool ascending, 
	IntPtr selector
)
Parameters
keyPath (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), 10.5 (For Mac OS X 10.5 and later)

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