# Arithmetic.FunctionAttribute class

Namespace: [Grasshopper2](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class Arithmetic.FunctionAttribute : Attribute
```

Any function method inside an [ArithmeticRepository](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmeticrepository.md) must be decorated with this attribute to identify it as such. The method signature must follow: TResult Method(TA a, TB b)

## Constructors

- [Arithmetic.FunctionAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/ctor.md): (3 overloads) Create a new binary function attribute. The method signature for this attribute must follow: TResult Method(TA a, TB b)

## Properties

- [Arity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/arity.md): Gets the arity this attribute specifies.
- [Binary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/binary.md): Gets the binary function specified by this attribute. This property only has a meaningful value if the [Arithmetic.FunctionAttribute.Arity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/arity.md) equals 2.
- [Ternary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/ternary.md): Gets the ternary function specified by this attribute. This property only has a meaningful value if the [Arithmetic.FunctionAttribute.Arity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/arity.md) equals 3.
- [Unary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/unary.md): Gets the unary function specified by this attribute. This property only has a meaningful value if the [Arithmetic.FunctionAttribute.Arity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute/arity.md) equals 1.
