Calculates a custom function returning a FunctionValue given a list of FunctionValue arguments and the function's current Cell for context.

FunctionValue CustomFunction(IList<FunctionValue> args, Cell currentCell)
Function CustomFunction(IList<FunctionValue> args, Cell currentCell) As FunctionValue

An ordered list of FunctionValue arguments that have already been fully evaluated.

The Cell that the current function resides in to use for context sensitive operations

A FunctionValue that contains the resulting value of the function.

 

 

    public FunctionValue CustomFunction(IList<FunctionValue> args, Cell currentCell)
    {
        StringBuilder result = new StringBuilder("");
 
 
        foreach (FunctionValue arg in args)
            if (arg.Type != FunctionValueType.RANGE)
                result.Append(arg);
 
 
        return new FunctionValue(result.ToString());
    }
    Public Function CustomFunction(args As IList(Of FunctionValue), currentCell As Cell) As FunctionValue
        Dim result As New StringBuilder("")
        For Each arg As v In args
            If arg.Type <> FunctionValueType.RANGE Then
                result.Append(arg)
            End If
        Next
        Return New FunctionValue(result.ToString())
    End Function