Cannot declare a variable with public access in a class from a module

后端 未结 2 1717
感情败类
感情败类 2021-01-24 11:48

I am making a GUI based application (forms), and encountered the following error.

Firstly, I am declaring the following stuff in a module

Module test_mod         


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-24 11:55

    By default modules and classes are Friend (only visible to your assembly).

    Your form, however, is explicitly Public, which exposes it and its members to the world - which extends test_mod.main_struct's visibility.

    Declare your module as Public too.

提交回复
热议问题