'ParentFormID' cannot expose type 'Module1.ParentFormIDEnum' outside the project through class 'MyClass'.
Here is the related code:
Enum ParentFormIDEnum As Integer POReceiving = 1 Production = 4 Returns = 5 End Enum
End Module
Public WriteOnly Property ParentFormID() As ParentFormIDEnum Set(ByVal value As ParentFormIDEnum) miParentFormID = value End Set End Property
End Class
I'm not sure what this error means. All I'm trying to do is create a global enum and be able to use it in all areas of my program.
1) If you reference your project from another project, whether VB or C#, the module routines aren't accessible even if they're public.2) You can name a local method in a class the same as a public module routine, and the compiler won't say anything about it. When you use the method, the compiler won't require you to prefix it; it'll just happily use the local version instead of the module with no warning.Shared classes, on the other hand, are accessible to outside projects (if you want them to be), and shared classes avoid the ambiguity because of the prefixed class name.