Constants must be of an intrinsic or enumerated type, not a class, structure, type parameter, or array type

You have attempted to declare a constant as a class, structure, or array type, or as a type parameter defined by a containing generic type.

Constants must be of an intrinsic type (Boolean, Byte, Date, Decimal, Double, Integer, Long, Object, SByte, Short, Single, String, UInteger, ULong, or UShort), or an Enum type based on one of the integral types.

Error ID: BC30424

To correct this error

  1. Declare the constant as an intrinsic or Enum type.

  2. A constant can also be a special value such as True, False, or Nothing. The compiler considers these predefined values to be of the appropriate intrinsic type.

See Also

Concepts

Constants Overview

Data Types in Visual Basic

Reference

Data Type Summary (Visual Basic)

Other Resources

Constants and Enumerations (Visual Basic)