Expression Editor for WinForms | ComponentOne
In This Topic
    Built-in Functions, Operators, and Constants
    In This Topic

    Expression Editor provides following built-in:

    Functions

    Aggregate Functions Syntax Description
    Average(value1….valueN) Average() Computes the average of a specified sequence of numbers (or enumerable).
    Count(value1….valueN) Count() Gets the number of elements actually contained in a specified sequence
    First(value1….valueN) First() Returns the first element of a specified sequence.
    Last(value1….valueN) Last() Returns the last element of all the specified elements.
    Max(value1….valueN) Max() Returns the maximum value in a specified sequence of numbers (or enumerable).
    Min(value1….valueN) Min() Returns the minimum value in a specified sequence of numbers (or enumerable).
    Sum(value1….valueN) Sum()
    Computes the sum of a specified sequence of numbers (or enumerable).
    DateTime Functions Syntax Description
    Now() Now() Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the local time.
    Today() Today()
    Gets the current date.
    AddDays(DateTime, DaysCount) AddDays(
    DateTime date,
    int days
    )
    Returns a new System.DateTime that adds the specified number of days to the specified System.DateTime value.
    AddHours(DateTime, HoursCount) AddHours(
    DateTime date,
    int hours
    )
    Returns a new System.DateTime that adds the specified number of hours to the specified System.DateTime value.
    AddMilliSeconds(DateTime, MilliSecondsCount) AddMilliSeconds(
    DateTime date,
    int milliSeconds
    )
    Returns a new System.DateTime that adds the specified number of milliseconds to the specified System.DateTime value.
    AddMinutes(DateTime, MinutesCount) AddMinutes(
    DateTime date,
    int minutes
    )
    Returns a new System.DateTime that adds the specified number of minutes to the specified System.DateTime value.
    AddMonths(DateTime, MonthsCount) AddMonths(
    DateTime date,
    int months
    )
    Returns a new System.DateTime that adds the specified number of months to the specified System.DateTime value.
    AddSeconds(DateTime, SecondsCount) AddSeconds(
    DateTime date,
    int seconds
    )
    Returns a new System.DateTime that adds the specified number of seconds to the specified System.DateTime value.
    AddTicks(DateTime, TicksCount) AddTicks(
    DateTime date,
    int ticks
    )
    Returns a new System.DateTime that adds the specified number of ticks to the specified System.DateTime value.
    AddTimeSpan(DateTime, TimeSpan) AddTimeSpan(
    DateTime date,
    TimeSpan timeSpan
    )
    Returns a new System.DateTime that adds the specified number of System.TimeSpan to the specified System.DateTime value.
    AddYears(DateTime, YearsCount) AddYears(
    DateTime date,
    int years
    )
    Returns a new System.DateTime that adds the specified number of years to the specified System.DateTime value.
    DateDiffDay(startDate, endDate) DateDiffDay(,) Counts the number of day boundaries between two non-nullable dates.
    DateDiffHour(startDate, endDate) DateDiffHour(,) Counts the number of hour boundaries between two non-nullable dates.
    DateDiffMilliSecond(startDate, endDate) DateDiffMilliSecond(,) Counts the number of milliseconds boundaries between two non-nullable dates.
    DateDiffMinute(startDate, endDate)

    DateDiffMinute(,)

     

    Counts the number of minutes boundaries between two non-nullable dates.
    DateDiffSecond(startDate, endDate) DateDiffSecond(,) Counts the number of seconds boundaries between two non-nullable dates.
    DateDiffTick(startDate, endDate) DateDiffTick(,) Counts the number of ticks boundaries between two non-nullable dates.
    GetDate(DateTime) GetDate() Gets the date component of specified System.DateTime value.
    GetDay(DateTime) GetDay() Gets the day of the month represented by the specified System.DateTime value.
    GetDayOfWeek(DateTime) GetDayOfWeek() Gets the day of the week represented by the specified System.DateTime value.
    GetDayOfYear(DateTime) GetDayOfYear() Gets the day of the year represented by the specified System.DateTime value.
    GetHour(DateTime) GetHour() Gets the hour component of the specified System.DateTime value.
    GetMilliSecond(DateTime) GetMilliSecond() Gets the milliSecond component of the specified System.DateTime value.
    GetMinute(DateTime) GetMinute() Gets the minute component of the specified System.DateTime value.
    GetMonth(DateTime) GetMonth() Gets the month component of the specified System.DateTime value.
    GetSecond(DateTime) GetSecond() Gets the seconds component of the specified System.DateTime value.
    GetTimeOfDay(DateTime)

    GetTimeOfDay()

     

    Gets the time of day for the specified System.DateTime value.
    GetYear(DateTime) GetYear() Gets the year component of the specified System.DateTime value.
    UtcNow() UtcNow() Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
    Logical Functions Syntax Description
    IsNull(Value) IsNull(object param) Returns True if the specified Value is NULL.
    Iif(condition, resultTrue,resultFalse) Iif(
    bool condition,
    object expressionTrue,
    object expressionFalse
    )
    Returns the evaluation of one of two expressions, depending on the condition.
    Math Functions Syntax Description
    Abs(Value) Abs() Returns the absolute value of a number.
    Acos(Value) Acos() Returns the angle whose cosine is the specified number.
    Asin(Value) Asin() Returns the angle whose sine is the specified number.
    Atan(Value) Atan() Returns the angle whose tangent is the specified number.
    Atan2(Value1, Value2) Atan2(,) Returns the angle whose tangent is the quotient of two specified numbers.
    Ceiling(Value) Ceiling() Returns the smallest integral value that's greater than or equal to the specified decimal or double.
    Cos(Value) Cos() Returns the cosine of the specified angle.
    Cosh(Value) Cosh() Returns the hyperbolic cosine of the specified angle.
    Exp(Value) Exp() Returns e (the base of natural logarithms) raised to the specified power.
    Floor(Value) Floor() Returns the largest integer that's less than or equal to the specified decimal or double number.
    Log(Value) Log() Returns the natural (base e) logarithm of a specified number or the logarithm of a specified number in a specified base.
    Log(Value, Base) Log(,) Returns the natural (base e) logarithm of a specified number or the logarithm of a specified number in a specified base.
    Log10(Value) Log10() Returns the base 10 logarithm of a specified number.
    Pow(Value1, Value2) Pow() Returns a specified number raised to the specified power.
    Rand(Value) Rand() Returns a nonnegative random number.
    RandBetween(Value1, Value2) RandBetween() Returns a random number within a specified range.
    Sign(Value) Sign() Returns an integer value indicating the sign of a number.
    Sin(Value) Sin() Returns the sine of the specified angle.
    Sinh(Value) Sinh() Returns the hyperbolic sine of the specified angle.
    Sqrt(Value) Sqrt() Returns the square root of a specified number.
    Tan(Value) Tan() Returns the tangent of the specified angle.
    Tanh(Value) Tanh() Returns the hyperbolic tangent of the specified angle.
    Convert Functions Syntax Description
    CBool(string) CBool() Converts the specified string representation of a logical value to its System.Boolean equivalent, or throws an exception if the string is not equivalent to the value of System.Boolean.TrueString or System.Boolean.FalseString.
    CByte(string) CByte() Converts the string representation of a number to its System.Byte equivalent.
    CChar(string) CChar() Converts the value of the specified string to its equivalent Unicode character.
    CDate(string) CDate() Converts the specified string representation of a date and time to its System.DateTime equivalent.
    Cdbl(string) CDbl() Converts string representation of a number to its double-precision floating-point number equivalent.
    CDec(string) CDec() Converts the string representation of a number to its System.Decimal equivalent.
    CInt(string) CInt() Converts the string representation of a number to its 32-bit signed integer equivalent.
    CLng(string) CLng()  Converts the string representation of a number to its 64-bit signed integer equivalent.
    CObj(value) CObj() Returns the specified elemsnt as System.Object.
    CSByte(string) CSByte() Converts the string representation of a number to its 8-bit signed integer equivalent.
    CShort(string) CShort() Converts the string representation of a number to its 16-bit signed integer equivalent.
    CSng(string) CSng() Converts the string representation of a number to its single-precision floating-point number equivalent.
    CStr(value) CStr() Tries to evaluate the specified expression and return the result as a string.
    CType(value,type) CType(,) Returns an object of the specified type and whose value is equivalent to the specified object.
    value- the specified object for conversion.
    type- the type name of object to return.
    CUint(value) CUint() Converts the string representation of a number to its 32-bit unsigned integer equivalent.
    CULong(value) CULong() Converts the string representation of a number to its 64-bit unsigned integer equivalent.
    CUShort(value) CUShort() Converts the string representation of a number to its 16-bit unsigned integer equivalent.
    Text Functions Syntax Description
    Replace(string,oldValue,newValue) Replace(,,) Replaces all occurrences of a specified string value with another string value.
    Rset(value, length) RSet(,) Returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified character.
    Rset(value, length,char) RSet(,,) Returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified character.
    Remove(string,start) Remove(,) Deletes all characters from this instance, beginning at a specified position.
    Remove(string,start,count) Remove(,,) Deletes all characters from this instance, beginning at a specified position.
    LSet(string,length) LSet(,) Returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified character.
    LSet(string,length,char) LSet(,,) Returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified character.
    UCase(string) UCase() Returns a character expression with lowercase character data converted to uppercase.
    LCase(string) LCase() Returns a character expression after converting uppercase character data to lowercase.
    Insert(string,index,value) Insert(,,) Returns a new string in which a specified string is inserted at a specified index position in this instance.
    Len(string) Len() Returns the number of characters of the specified string expression.
    Trim(string) Trim() Removes the space character char(32) or other specified characters from the start or end of a string.
    StartsWith(string,value) StartsWith(,) Determines whether the beginning of this string instance matches a specified string.
    StrReverse(string) StrReverse() Returns the reverse order of a string value.
    EndsWith(string,value) EndsWith(,) Determines whether the end of this string instance matches a specified string.
    Contains(string,value) Contains(,) Returns a value indicating whether a specified substring occurs within this string.
    InStr(string,value) InStr(,) Searches an expression for another expression and returns its starting position if found.
    InStr(string,value,start) InStr(,,) Searches an expression for another expression and returns its starting position if found.
    Mid(string,start) Mid(,) Returns a string that contains all the characters starting from a specified position in a string.
    Mid(string,start,length) Mid(,,) Returns a string that contains a specified number of characters starting from a specified position in a string.
    Chr(string) Chr() Converts an int ASCII code to a character.
    Asc(string) Acs() Returns the ASCII code value of the leftmost character of a character expression.
    Concat(string,value1…..valueN) Concat(,) Returns a string that is the result of concatenating two or more string values.
    Back to Top

    Operators

    Operators Syntax Description
    Plus + Sums two numbers.
    Concat & Generates a string concatenation of two expressions.
    Minus - Finds the difference between two numbers or indicates the negative value of a numeric expression.
    Multiply * Multiplies two numbers.
    Divide / Divides two numbers and returns a floating-point result.
    Modulus Mod Divides two numbers and returns only the remainder.
    Equal = Returns a Boolean value that indicates whether the left and right expressions are equal.
    GreaterThan
    > Returns a Boolean value that indicates whether the left expression is greater than right expression.
    LessThan < Returns a Boolean value that indicates whether the left expression is less than right expression.
    NotEqual <> Returns a Boolean value that indicates whether the left and right expressions are not equal.
    GreaterOrEqua >= Returns a Boolean value that indicates whether the left expression is greater than right expression or equal.
    LessOrEqual <= Returns a Boolean value that indicates whether the left expression is less than right expression or equal.
    And And Performs a logical conjunction on two expressions.
    Or Or Performs a logical disjunction on two expressions.
    Not Not Performs logical negation on an expression.
    Back to Top

    Constants

    Constants Syntax Description
    True True Returns True.
    False False Returns False.
    Nothing Nothing Returns Null.

    Back to Top