Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.22 KB

how-to-create-a-string-from-an-array-of-char-values.md

File metadata and controls

32 lines (22 loc) · 1.22 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: How to: Create a String from An Array of Char Values (Visual Basic)
How to: Create a String from An Array of Char Values
07/20/2015
examples [Visual Basic], arrays
examples [Visual Basic], Char data type
69f94e85-d57c-4ccc-a62a-426e829f5c5e

How to: Create a String from An Array of Char Values (Visual Basic)

This example creates the string "abcd" from individual characters.

Example

[!code-vbVbVbalrStrings#61]

Compile the code

This method has no special requirements.

The syntax "a"c, where a single c follows a single character in quotation marks, is used to create a character literal.

Robust Programming

Null characters (equivalent to Chr(0)) in the string lead to unexpected results when using the string. The null character will be included with the string, but characters following the null character will not be displayed in some situations.

See also