Questa in C# si farebbe funzionare, anche con una classe statica.
Non capisco davvero perchè in VB.NET no.
Una Structure in un modulo:
Module Module1
Public Structure TestType
Public Number As Integer
Public Flag As Boolean
Public Writing As String
End Structure
End Module
Un metodo in una classe. Il metodo vorrebbe restituire quella Structure:
Public Class Class1
Public Function Method() As TestType '***
Dim P As TestType
P.Flag = True
P.Number = 1
P.Writing = "Why doesn't it work?"
Return P
End Function
End Class
Il TestType indicato con *** mi dà l'errore:
'Method' non può esporre il tipo 'Module1.TestType' all'esterno del progetto mediante class 'Class1'.
Chi lo capisce?