Udostępnij za pośrednictwem


'Sub New' cannot be declared in an interface

You have attempted to declare Sub New within an interface. Because it is a constructor, Sub New can run only once when a class is created. It cannot be called explicitly from anywhere other than the first line of code in another constructor in either the same class or a derived class.

Error ID: BC30363

To correct this error

  • Remove the Sub New or move it to a more appropriate place in your code.

See Also

Reference

Using Constructors and Destructors