Gets the selector for the given method.
The selector for a method is build with the following rules:
- Selector begins with the method name
- The first parameter if present is appended by its name with the "With" prefix
- The other parameters if present are appended by their names
Here are some examples of result:
Method | Corresponding selector |
---|---|
public void DoThis() | DoThis |
public void DoThis(int value) | DoThisWithValue: |
public void DoThis(NSString str, int val) | DoThisWithStr:val: |
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static string GetSelector( MethodBase methodBase )
Public Shared Function GetSelector ( _ methodBase As MethodBase _ ) As String
public: static String^ GetSelector( MethodBase^ methodBase )
Parameters
- methodBase (MethodBase)
- The method.
Return Value
A selector compliant with Objective-C messaging.
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)