String
  • 16 Apr 2024
  • 1 Minute to read
  • Dark
    Light

String

  • Dark
    Light

Article summary

General

The string data type contains data in textual format and can hold a number of unicode characters. A detailed explanation of the string data type can be found in the  String Data-Type article of the Visual Basic .NET language documentation.

Constants

Constant string values have to be enclosed in double-quotes; the following expression returns the string Hello World:

Mail & Deploy Expression

"Hello World"

Operators

The string data type supports the following operators:

& (Concatenation)

You can concatenate two strings by using the & operator. The following example combines two string constants:

Mail & Deploy Expression

"Hello " & "World"

The following expression returns the constant string Today is: concatenated with the current Date-Time formatted to a string with a Format String of dd.MM.yyyy (e.g. Today is: 31.12.2021) using the Format function:

Mail & Deploy Expression

"Today is: " & Format(DateTime.Today, "dd.MM.yyyy")


Was this article helpful?

What's Next