Dom*_*air 19 .net vb.net wpf module access-modifiers
我有一个由几个有用的小工具组成的程序集.在其中我有一个包含简单公共功能的模块.
Module FishTrackerConfigurations
Public Function GetValueOfUseProductId As Boolean
Return VtlGetUseProductId 'A simple private routine in the same module
End Function
End Module
Run Code Online (Sandbox Code Playgroud)
当我从另一个项目(其中引用此程序集)调用此函数时,我得到以下错误.
Error BC30390 'FishTrackerConfigurations.Public Function GetValueOfUseProductId() As Boolean' is not accessible in this context because it is 'Public'.
Run Code Online (Sandbox Code Playgroud)
从我的项目Application.Xaml.VB文件中调用该函数,特别是在Protected Overrides Sub OnStartup(e As StartupEventArgs)例程中.
我想知道为什么会这样.
Mat*_*lko 34
虽然方法是Public,但模块(默认情况下)不是.
您需要明确指定:
Public Module FishTrackerConfigurations
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3395 次 |
| 最近记录: |