'}' expected

An array initializer or a constraint list has not been ended in a valid fashion.

The element values with which to initialize an array must be enclosed in braces ({}).

Dim demoArray() As Integer = New Integer() {1, 2, 3} 

Similarly, the constraints in a constraint list for a generic type parameter must be enclosed in braces.

Public Class dictionaryMaker(Of t As {IComparable, IDisposable, New}) 

Error ID: BC30370

To correct this error

  • Use "}" to end the array initializer or constraint list.

See Also

Tasks

How to: Initialize an Array Variable

Concepts

Generic Types in Visual Basic

Reference

Type List

Other Resources

Arrays in Visual Basic