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

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

An ordered list of arguments passed into the custom function (already evaluated) as ComputationResults.

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

A ComputationResult that contains the resulting value of the function.

 

 

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