问题描述
我有其他同事的节目。我想通过调用MessageBox.Show()来添加调试消息。这就是我必须添加一行使用System.Windows.Forms;的原因。在文件的开头。我收到错误
类型或命名空间名称'Forms'在名称空间'System.Windows'中不存在(你错过了程序集引用吗?)
它出什么问题了?我用使用System.Windows.Forms;很好地在同一个项目的另一个文件中,并从其他文件中复制该行。 装配参考是什么意思?我应该怎么做才能解决这个问题?
I've got a program from other coworker. I would like to add a debugging message by calling MessageBox.Show(). That's the reason I must add one line of "using System.Windows.Forms;" in the beginning of the file. I got error of
"The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)"
What's wrong with it? I used "using System.Windows.Forms;" very well at another file of the same project and copy that line from other file. What does "assembly reference" mean? What should I do to work it out?
这篇关于为什么它不能使用“System.Windows.Forms”命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!