Udostępnij za pośrednictwem


'=' expected (object initializer)

To establish the initial value for a field or property in an object initializer declaration, you must use an equal sign. For example, the following declaration assigns "Microsoft" as the initial value for the Name property of client.

Dim client As New Customer { .Name = "Microsoft" }

Error ID: BC30984

To correct this error

  • Add an equal sign in the position shown in the previous example.

See Also

Concepts

Object Initializers: Named and Anonymous Types

Properties and Property Procedures

Property Procedures vs. Fields