Compartilhar via


Diversos tipos de dados (Visual Basic)

Visual Basic supplies several data types that are not oriented toward numbers or characters. Instead, they deal with specialized data such as yes/no values, date/time values, and object addresses.

For a table showing a side-by-side comparison of the Visual Basic data types, see Resumo de tipo de dados (Visual Basic).

Boolean Type

The Tipo de dados booleanos (Visual Basic) is an unsigned value that is interpreted as either True or False. Its data width depends on the implementing platform. If a variable can contain only two-state values such as true/false, yes/no, or on/off, declare it as Boolean.

Date Type

The Tipo de dados Data (Visual Basic) is a 64-bit value that holds both date and time information. Each increment represents 100 nanoseconds of elapsed time since the beginning (12:00 AM) of January 1 of the year 1 in the Gregorian calendar. If a variable can contain a date value, a time value, or both, declare it as Date.

Object Type

The Tipo de dados Object is a 32-bit address that points to an object instance within your application or in some other application. An Object variable can refer to any object your application recognizes, or to data of any data type. If a variable stores a pointer to an instance of a class that you do not know at compile time, or if it can point to data of various data types, declare it as Object.

Consulte também

Tarefas

Solucionando problemas de tipos de dados (Visual Basic)

Como: Armazenar valores verdadeiros e falsos em uma variável (Visual Basic)

Como: Armazenar valores de data e hora em uma variável (Visual Basic)

Como: Armazenar dados de tipo desconhecido em uma variável (Visual Basic)

Conceitos

Caracteres de tipo (Visual Basic)

Tipos de dados numéricos (Visual Basic)

Tipos de dados de caractere (Visual Basic)

Outros recursos

Tipos de dados elementares (Visual Basic)