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

# method_getNumberOfArguments(_:)

Returns the number of arguments accepted by a method.

## Declaration

```swift
func method_getNumberOfArguments(_ m: Method) -> UInt32
```

## Parameters

- `m`: A pointer to a doc://com.apple.objectivec/documentation/ObjectiveC/Method data structure. Pass the method in question.

## Return Value

Return Value An integer containing the number of arguments accepted by the given method.

## See Also

### Working with Methods

- [method_getName(_:)](objectivec/method_getname(_:).md)
- [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_getArgumentType(_:_:_:_:)](objectivec/method_getargumenttype(_:_:_:_:).md)
- [method_getDescription(_:)](objectivec/method_getdescription(_:).md)
- [method_setImplementation(_:_:)](objectivec/method_setimplementation(_:_:).md)
- [method_exchangeImplementations(_:_:)](objectivec/method_exchangeimplementations(_:_:).md)
