结构无法声明没有参数的非共享“Sub New”Structures cannot declare a non-shared 'Sub New' with no parameters

结构内部声明的Sub New 构造函数必须接受参数或用 Shared 修饰符声明。Sub New constructors declared within structures must either accept arguments or be declared with the Shared modifier.

错误 ID: BC30629Error ID: BC30629

更正此错误To correct this error

  • 更改 Sub New 构造函数以便它可以接受参数。Change the Sub New constructor so that it accepts arguments.

  • 应用 Shared 修饰符以使构造函数可共享。Apply the Shared modifier to make the constructor shared.

另请参阅See also