我在Module Telephony中定义了名为USIM_DEF的结构。
模块电话位于文件common.vb中 来自函数F1的另一个文件BatteryTests.vb我调用在Public Class BaseStation中的文件BaseStationClass.vb中定义的函数F2。 函数F2具有结构USIM_DEF的参数之一。我得到的错误是:
' USIM_DEF_elem'无法公开类型' Telephony.USIM_DEF'在课程之外通过课程' BaseStation'。 C:\ Git \ Power_Automation \ Power_Automation \ bin \ tests \ tests \ BaseStationClass.vb 106 48次测试
这是我的代码请帮助:
文件common.vb
Module Telephony
Public Structure USIM_DEF
Public SimIndex As USIM_ind
Public Rat As CELL_RAT
Public PlmnNum As PlmnNumberParts
End Structure
文件BatteryTests.vb
Module BatteryTests
Sub Prepare_UE(.,.,.,.,.,)
'I call function that defined in file
End Sub
File BaseStationClass.vb
Public Class BaseStation
Overridable Function SetMNC(ByVal device As GPIB,
ByVal USIM_DEF_elem As USIM_DEF, //compile ERROR
Optional ByVal container As TestContainer = Nothing,
Optional ByVal timeout As Integer = 1000) As Boolean
Return False
End Function
Overrides Function SetMNC(ByVal device As GPIB,
ByVal USIM_DEF_elem As USIM_DEF, // compile ERROR
Optional ByVal container As TestContainer = Nothing,
Optional ByVal timeout As Integer = 1000) As Boolean
' .......
' ......
' ......
Return True
End Function
End Class
出了什么问题 为什么我不能在Public Class中调用Module ????
中定义的结构类型的参数非常感谢 Ilana