'TestString' is not declared. It may be inaccessible due to its protection level. (BC30451) [closed]

主宰稳场 提交于 2019-12-01 00:08:31

Just like normal VB.NET, as well as adding a reference, you have to Imports the relevant namespace, or specify it fully. (You've edited the question to now include this.)

After inserting your code into a new Console project in VS2008 (because that's what I had open) and adjusting for my assembly names, I saw the same as you.

I fixed it by adding Public to the default Module Module1.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!