---
title: "method_getName(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.5+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/method_getname(_:)"
---

# method_getName(_:)

Returns the name of a method.

## Declaration

```swift
func method_getName(_ m: Method) -> Selector
```

## Parameters

- `m`: The method to inspect.

## Return Value

Return Value A pointer of type SEL.

## Discussion

Discussion To get the method name as a C string, call sel_getName(method_getName(method)).

## See Also

### Working with Methods

- [method_getImplementation(_:)](objectivec/method_getimplementation(_:).md)
- [method_getTypeEncoding(_:)](objectivec/method_gettypeencoding(_:).md)
- [method_copyReturnType(_:)](objectivec/method_copyreturntype(_:).md)
- [method_copyArgumentType(_:_:)](objectivec/method_copyargumenttype(_:_:).md)
- [method_getReturnType(_:_:_:)](objectivec/method_getreturntype(_:_:_:).md)
- [method_getNumberOfArguments(_:)](objectivec/method_getnumberofarguments(_:).md)
- [method_getArgumentType(_:_:_:_:)](objectivec/method_getargumenttype(_:_:_:_:).md)
- [method_getDescription(_:)](objectivec/method_getdescription(_:).md)
- [method_setImplementation(_:_:)](objectivec/method_setimplementation(_:_:).md)
- [method_exchangeImplementations(_:_:)](objectivec/method_exchangeimplementations(_:_:).md)
