VB.NET - Public structures & error "exposing outside of class"

I have a structure that I want to use in several classes defined in a module "Common"

when i try to use a function that will return the the structure to a parent class i get this error

'GetRoomUsers' cannot expose type 'Common.Shared_RoomUserDetails' outside the project through class 'IRCClient'

this is the function

    Public Function GetRoomUsers() As Shared_RoomUserDetails
        Return RoomUsers
    End Function

is it possible to define common structures in modules or is this a bad practice? what am i doing wrong here? I don't understand why this would give me an error.
Who is Participating?
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
Did you definde the Module as public ?

Public Module Common
' ...
End Module
mcaincAuthor Commented:
yeah, the module is public
mcaincAuthor Commented:
oh damnit, you were right... i had the standard definition

Module Common
End Module

feel like an idiot :)
Jorge PaulinoIT Pro/DeveloperCommented:
If the module is public (Public Module Common) then you should have problems.
Can you show some more code how do you have ?
Jorge PaulinoIT Pro/DeveloperCommented:
Ok, glad I could help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.