IFunction.Evaluate(IList<ParameterValue>, EvaluationContext) Method
Performs required calculations and returns the result.
Namespace: DevExpress.Spreadsheet.Functions
Assembly: DevExpress.Spreadsheet.v17.2.Core.dll
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Evaluate(IList<ParameterValue>, EvaluationContext) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.