Link to home
Start Free TrialLog in
Avatar of jackjohnson44
jackjohnson44

asked on

vb.net pass structure into class function

I am trying to pass a public structure contained in a mod into a function in a control.

Module ModStructures
    Public Structure singleStep
        Public instrument As String
        Public mode As String
        Public paramater As String
        Public label As String
        Public inputType As String
        Public value As String
        Public options As String
    End Structure
End Module

Public Class ctrlMyControl
    Public Function initInput(ByVal stepObject As singleStep)

I am getting the error:
'stepObject' cannot expose type 'ModStructures.singleStep' outside the project through class 'ctrlMyControl'

What am I doing wrong?
Avatar of ZeonFlash
ZeonFlash

Does your initInput need to be Public?  If not, set it to Private and it works.
Avatar of jackjohnson44

ASKER

yes, it does
I'd play with a couple things...

1. Try declaring singleStep as Public Shared.
2. Move the singleStep into the ctrlMyControl class.
Check that... option 2 works; option 1 doesn't
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial