Wctrl.cs(86,6): error CS0234:
类型或命名空间名称“hl”在类或命名空间“Wc”中不存在(是否缺少程序集引用
?)
Wctrl.cs(87,21): error CS0246: 找不到类型或命名空间名称“aa”(是否缺少 using
指令或程序集引用?)using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;namespace Wc
{
/// <summary>
/// Wctrl 的摘要说明。
/// </summary>
public class Wctrl : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public Wctrl()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent(); // TODO: 在 InitializeComponent 调用后添加任何初始化 } /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(152, 23);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(104, 96);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Wctrl
//
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Name = "Wctrl";
this.Size = new System.Drawing.Size(280, 152);
this.ResumeLayout(false); }
#endregion private void button1_Click(object sender, System.EventArgs e)
{
Wc.hl.AuthorsService aa = new Wc.hl.AuthorsService(); //好像问题就在这
this.label1.Text=aa.HelloWorld();
}
}
}
类型或命名空间名称“hl”在类或命名空间“Wc”中不存在(是否缺少程序集引用
?)
Wctrl.cs(87,21): error CS0246: 找不到类型或命名空间名称“aa”(是否缺少 using
指令或程序集引用?)using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;namespace Wc
{
/// <summary>
/// Wctrl 的摘要说明。
/// </summary>
public class Wctrl : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public Wctrl()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent(); // TODO: 在 InitializeComponent 调用后添加任何初始化 } /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(152, 23);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(104, 96);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Wctrl
//
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Name = "Wctrl";
this.Size = new System.Drawing.Size(280, 152);
this.ResumeLayout(false); }
#endregion private void button1_Click(object sender, System.EventArgs e)
{
Wc.hl.AuthorsService aa = new Wc.hl.AuthorsService(); //好像问题就在这
this.label1.Text=aa.HelloWorld();
}
}
}
解决方案 »
- 为何出现“无法创建目录或文件”的错误
- C# devexpress gridcontrol 绑定显示问题
- VS安装多次失败后的截图
- “/”应用程序中的服务器错误。
- 关于三层结构DbHelperSQL连接不同数据库的问题,棘手
- SOS!安装VS.net2003的时候出现错误1935安装汇编组件错误
- MDI子窗体菜单 突然无法合并到主窗体菜单了 好晕
- 我在WevServices服务端使用了vjslib.dll这个.NET自带的动态库,可是把这个服务端部署到另一台机器却说没有找到,我搜索过是有的!!!
- c#使用WMI的问题
- 怎样把dataset中表的内容插入到数据库的表中?
- 请教:::如何将图片做为背景
- 无模窗体如何调整大小
hl是什么?
类名?
如果是类名的话,就要引用该类所在的命名空间