<!-- Generated by tools/SharpCell.Docs from the XML documentation comments. Do not edit; run the tool with 'generate'. -->

# FunctionArguments

```csharp
public sealed class FunctionArguments
```

Namespace `SharpCell` · package `SharpCell`

The arguments of one call of a function added through [Workbook.Functions](SharpCell.Workbook.md#functions). Valid only while the function runs.

## Properties

<a id="caller"></a>
### Caller

```csharp
public Cell? Caller { get; }
```

The cell whose formula makes the call; null when the formula was given to [Workbook.Evaluate](SharpCell.Workbook.md#evaluate-string).

<a id="cancellationtoken"></a>
### CancellationToken

```csharp
public CancellationToken CancellationToken { get; }
```

The token passed to [Workbook.Recalculate](SharpCell.Workbook.md#recalculate-cancellationtoken) or [Workbook.Evaluate](SharpCell.Workbook.md#evaluate-string-cancellationtoken), for a slow function to stop early: an `OperationCanceledException` it throws once the token is cancelled cancels the calculation.

<a id="count"></a>
### Count

```csharp
public int Count { get; }
```

How many arguments the call has, omitted ones included.

<a id="culture"></a>
### Culture

```csharp
public CultureInfo Culture { get; }
```

The workbook's culture, as used for converting between text and numbers.

<a id="datesystem"></a>
### DateSystem

```csharp
public DateSystem DateSystem { get; }
```

The workbook's date system, for reading date arguments with [CellValue.AsDateTime](SharpCell.CellValue.md#asdatetime-datesystem).

<a id="item-int"></a>
### this[int]

```csharp
public CellValue this[int index] { get; }
```

The argument's value: a single cell's value, a range as an [CellValueKind.Array](SharpCell.CellValueKind.md#array), an error as an error value, and [CellValue.Missing](SharpCell.CellValue.md#missing) for an argument left out, as the middle one of `F(1,,2)`. An array is a copy the function may change.

**Exceptions**

- `ArgumentOutOfRangeException`: There is no such argument.

## Methods

<a id="boolean-int"></a>
### Boolean(int)

```csharp
public CellValue Boolean(int index)
```

The argument converted to a logical value as Excel converts it: TRUE or FALSE, or the error to return.

<a id="ismissing-int"></a>
### IsMissing(int)

```csharp
public bool IsMissing(int index)
```

Whether the argument was left out, as the middle one of `F(1,,2)`.

<a id="number-int"></a>
### Number(int)

```csharp
public CellValue Number(int index)
```

The argument converted to a number as Excel converts it (text such as `"2"` included; an omitted argument is 0): a number, or the error to return, such as `#VALUE!` for `"abc"`.

<a id="text-int"></a>
### Text(int)

```csharp
public CellValue Text(int index)
```

The argument converted to text as Excel converts it: text, or the error to return.
