Why is this public function in the module unavailable

I have an assembly consisting of several useful small utilities. Inside it there is a module containing a simple open function.

Module FishTrackerConfigurations

Public Function GetValueOfUseProductId As Boolean
    Return VtlGetUseProductId 'A simple private routine in the same module
End Function
End Module

When I call this function from another project (which this assembly refers to, I get the following error.

Error   BC30390 'FishTrackerConfigurations.Public Function GetValueOfUseProductId() As Boolean' is not accessible in this context because it is 'Public'.   

The function is called from my projects in the Application.Xaml.VB file, in particular in the subroutine "Protected Overrides Sub OnStartup (e As StartupEventArgs)".

I would like to know why this is happening.

+4
source share
1 answer

Although the method Public, the module (default) is not.

You need to specify this explicitly:

Public Module FishTrackerConfigurations
+14

All Articles