IFunction.Evaluate(IList<ParameterValue>, EvaluationContext) Method
Performs required calculations and returns the result.
Namespace: DevExpress.Spreadsheet.Functions
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
parameters | IList<ParameterValue> | A list of ParameterValue objects containing function parameters. |
context | EvaluationContext | An EvaluationContext object that provides information on the cell that contains the function, the current culture and the worksheet. |
Returns
Type | Description |
---|---|
ParameterValue | A ParameterValue object that contains the calculation result. |
Remarks
The Evaluate method is the core method of the function. When implementing this method, use the parameters passed to the function, information about the current cell and the current worksheet, provided by the EvaluationContext.Row, the EvaluationContext.Column and the EvaluationContext.Sheet properties. You can make the result dependent on the current culture by using the EvaluationContext.Culture property.
A result value specified by a return keyword (Return statement in VB.NET) does not have to be explicitly cast to the ParameterValue type. A ParameterValue type implements implicit conversion operators that require no cast expressions when assigning objects of any supported type to the ParameterValue instance. Therefore, you can return numeric, string, boolean and datetime values with no additional code. You can also return cell and range values. If an error occurs, you can return ParameterValue.ErrorName, ParameterValue.ErrorReference or another standard type of error defined for worksheet functions.