我有一个由几个有用的小实用程序组成的程序集。其中我有一个包含简单公共功能的模块。
Module FishTrackerConfigurations
Public Function GetValueOfUseProductId As Boolean
Return VtlGetUseProductId 'A simple private routine in the same module
End Function
End Module
当我从另一个项目(其中引用了该程序集)调用此函数时,出现以下错误。
Error BC30390 'FishTrackerConfigurations.Public Function GetValueOfUseProductId() As Boolean' is not accessible in this context because it is 'Public'.
该函数是从我的项目 Application.Xaml.VB 文件中调用的,特别是在 Protected Overrides Sub OnStartup(e As StartupEventArgs) 例程中。
我想知道为什么会发生这种情况。
虽然method is Public
, the Module(默认情况下)不是。
您需要明确指定这一点:
Public Module FishTrackerConfigurations
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)