Ist es möglich, Formulare in Unter-Namespaces eines VB.NET WinForms-Projekts zu haben?
Wenn ich ein neues Klassenbibliotheksprojekt in VB.NET erstelle, kann ich Unterordner erstellen (a la C #), diesen Unterordnern WinForm-Objekte hinzufügen und dann einen Namespace angeben:
Namespace Sub1.Sub2
Public Class SomeForm
Public Sub New()
InitializeComponent()
End Sub
End Class
End Namespace
Dies wird aufgelöst alsProjectRootNamespace.Sub1.Sub2.SomeForm
, was gut ist
Wenn ich jedoch ein neues WinForms-Projekt in VB.NET erstelle und das Gleiche versuche, wird im Designer der folgende Fehler angezeigt:
The class SomeForm can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again.
Gibt es eine Möglichkeit, Formulare in Unter-Namespaces einer VB.NET WinForms-App anstelle des Stamm-Namespaces zu haben?