Number
  • 04 May 2024
  • 1 Minute to read
  • Dark
    Light

Number

  • Dark
    Light

Article summary

General

Numeric values are represented by multiple data types in Visual Basic .NET:

However, these data types are very similiar, so for the usage within Mail & Deploy it's sufficient to treat them all the same in most cases.

Constants

You can specify constant numeric values in Mail & Deploy using a dot as the decimal separator; group separators cannot be provided when specifying constant numeric values. The following expression returns the number 12:

Mail & Deploy Expression

12

The following expression returns the number 1.512,75 (one thousand five-hundred and twelve decimal seventy-five):

Mail & Deploy Expression

1512.75

Operators

Numeric values support the following operators:

Operator

Description
+This operator adds two numeric values.
-This operator subtracts the numeric value to the right of the minus sign from the numeric value to the left of the minus sign.
*This operator multiplies both numeric values.
/This operator divides the number left of the division sign through the number right of the division sign.

Formatting

A numeric number can be formatted by using the Format function and supplying the number to format as well as the Format String to apply. The following example formats the number 1234 with a resulting string that contains group and decimal separators and two decimal digits:

Mail & Deploy Expression

Format(1234, "#,##0.00")


Was this article helpful?

What's Next