今天创建了一个类库,定义"KeyPressEventArgs"这个参数,需要在程序开始部分申明"System.Windows.Forms”,但是类库编译后报错。
错误提示:命名空间"System"中不存在类型或命名空间名称"Windows"(是缺少程序集引用吗?)
也就是说无法申明"System.Windows.Forms”
解决方法:需要在引用里面添加"System.Windows.Forms",这样就可以申明了,编译可以通过。
今天创建了一个类库,定义"KeyPressEventArgs"这个参数,需要在程序开始部分申明"System.Windows.Forms”,但是类库编译后报错。
错误提示:命名空间"System"中不存在类型或命名空间名称"Windows"(是缺少程序集引用吗?)
也就是说无法申明"System.Windows.Forms”
解决方法:需要在引用里面添加"System.Windows.Forms",这样就可以申明了,编译可以通过。