O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Char Data Type

The Char data type stores a character in Unicode format (more about this topic later in the chapter) using 16 bits, or 2 bytes. Unlike the String type, the Char data type is a value type. The following brief overview gives you more details:

.NET data type: System.Char

Represents: A single character

Range: 0–65.535, so that Unicode characters can be displayed

Type literal: c

Memory requirements: 2 bytes

Delegation to the processor: Yes

CLS-compliant: Yes

Description: Char values are often used in arrays, because in many cases it’s more practical to process individual characters than it is to process strings. Like any other data type, you can define Char arrays with constants (you’ll see an example shortly). The following section on strings ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required