我是 c# 新手,我在标题中告诉你的方法有问题。代码有点长,所以我将其发布到 pastebin。我正在使用 32feet.net api 在列表中列出蓝牙设备。
问题在第 43 行和第 50 行,声明如下:
错误 1 类型“WindowsFormsApplication1.Form1”已经定义了一个名为“Dispose”的成员,其参数类型相同 C:\Users\andre\documents\visual studio 2010\Projects\blueetoth\blueetoth\Form1.cs 43 33 blueetoth
和
*错误 2 类型“WindowsFormsApplication1.Form1”已经定义了一个名为“InitializeComponent”的成员,其参数类型相同 C:\Users\andre\documents\visual studio 2010\Projects\blueetoth\blueetoth\Form1.cs 50 22 blueetoth *
粘贴箱:http : //pastebin.com/LFEvaz2X
简短版本:处置()
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
简短版:initializeComponent
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.listBox1 = new System.Windows.Forms.ListBox();
//
// listBox1
//
this.listBox1.Location = new System.Drawing.Point(14, 14);
this.listBox1.Size = new System.Drawing.Size(212, 212);
//
// Form1
//
this.ClientSize = new System.Drawing.Size(240, 268);
this.Controls.Add(this.listBox1);
this.Menu = this.mainMenu1;
this.MinimizeBox = false;
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
}