skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ExpressionExtensions

Extension methods for RadExpression that provide convenient value extraction, type conversion, and validation operations for use throughout formula evaluation.

Inheritance
System.Object
ExpressionExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Expressions
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public static class ExpressionExtensions

Methods

GetValueAsConstantExpression(RadExpression)

Evaluates the expression and returns its value as a constant, extracting the first element if the result is an array.

Declaration
public static ConstantExpression GetValueAsConstantExpression(this RadExpression expression)
Parameters
RadExpression expression

The expression.

Returns
ConstantExpression

The ConstantExpression result.

IntegerValue(RadExpression)

Extracts the integer value from a numeric expression, throwing an exception if the expression is not a NumberExpression.

Declaration
public static int IntegerValue(this RadExpression expression)
Parameters
RadExpression expression

The expression.

Returns
System.Int32

The value as integer.

Exceptions
System.ArgumentNullException

Thrown when expression is not NumberExpression.

IsValidFunctionOrCellReferenceNamePart(Char)

Tests whether a character is valid within a function name or cell reference during formula parsing.

Declaration
public static bool IsValidFunctionOrCellReferenceNamePart(this char character)
Parameters
System.Char character

The character.

Returns
System.Boolean

True if valid, otherwise false.

NumberValue(RadExpression)

Extracts the numeric value from an expression, returning 0 if the expression is not a NumberExpression.

Declaration
public static double NumberValue(this RadExpression expression)
Parameters
RadExpression expression

The expression.

Returns
System.Double

The number value as double. If the expression is not NumberExpression returns 0.

ToBooleanExpression(Boolean)

Converts a Boolean value to the corresponding BooleanExpression singleton (True or False).

Declaration
public static BooleanExpression ToBooleanExpression(this bool value)
Parameters
System.Boolean value

The value.

Returns
BooleanExpression

The result as BooleanExpression.

ToCellRange(CellReferenceRange)

Converts a CellReferenceRange to the equivalent CellRange with resolved row and column indexes.

Declaration
public static CellRange ToCellRange(this CellReferenceRange cellReferenceRange)
Parameters
CellReferenceRange cellReferenceRange

The cell reference range.

Returns
CellRange

The cell range.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.