C#中,“形式”在命名空间system.windows不存在 [英] c#, 'Forms' does not exist in the namespace system.windows
问题描述
我刚开始对C#的工作,并与我从一些论坛得到了一些代码样本摆弄。
I have just started working on c#, and was fiddling with some code sample that I got from some forum.
此代码使用一个命名空间使用System.Windows.Forms的
对此我得到一个错误:窗体不命名空间中存在system.windows
。我也是收到有关未定义功能的一些错误 senddown
&安培; sendup
,我相信是在表格
名字空间。
This code is using a namespace using system.windows.forms
for which I am getting an error: Forms does not exist in the namespace system.windows
. Also I am getting some error related to undefined functions for senddown
& sendup
which I believe to be in the Forms
name space.
我使用的Visual Studio 10(与.NET框架的工作4.0)。任何想法如何解决这个问题?
I am using visual studio 10 (with .net frame work 4.0). Any idea how to fix this error?
感谢。
推荐答案
右键单击
在解决方案树项目,添加引用
,选择 System.Windows.Forms的
。
Right click
on the project in Solution Tree, Add Reference
, Select System.Windows.Forms
.
您需要添加引用有时会出现一些非默认组件。
You need to add reference to some non-default assemblies sometimes.
这篇关于C#中,“形式”在命名空间system.windows不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!