Udostępnij za pośrednictwem


Structures cannot declare a non-shared 'Sub New' with no parameters

Sub New constructors declared within structures must either accept arguments or be declared with the Shared modifier.

Error ID: BC30629

To correct this error

  • Change the Sub New constructor so that it accepts arguments.

  • Apply the Shared modifier to make the constructor shared.

See Also

Reference

Structure Statement

Other Resources

Structures: Your Own Data Types