千
千中元
Unregistered / Unconfirmed
GUEST, unregistred user!
“SampleBase.Form1.Dispose()” : 无法重写继承成员“System.ComponentModel.Component.Dispose()”,因为它未标记为 virtual、abstract 或 override
namespace SampleBase
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Xml;
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components;
public Form1()
{
InitializeComponent();
}
//下面这行出错
{
base.Dispose();
if(components != null)
components.Dispose();
}
namespace SampleBase
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Xml;
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components;
public Form1()
{
InitializeComponent();
}
//下面这行出错
代码:
[b]public override void Dispose()[/b]
base.Dispose();
if(components != null)
components.Dispose();
}