protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
为什么总是报错Form1.Dispose(bool)没有找到合适的方法重写,这个代码在vs2003可以运行,现在在2005就报错了
大小写应该也没问题啊,protect改成public也不行。
using System.Windows.Forms; Application.Run(new Form1());在void main中都添加了 之前看了一些类似问题的帖子 就是要添加这个,现在添加了可是仍然没有解决
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
为什么总是报错Form1.Dispose(bool)没有找到合适的方法重写,这个代码在vs2003可以运行,现在在2005就报错了
大小写应该也没问题啊,protect改成public也不行。
using System.Windows.Forms; Application.Run(new Form1());在void main中都添加了 之前看了一些类似问题的帖子 就是要添加这个,现在添加了可是仍然没有解决
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FMian());
}
}
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());//Application.Run(new FMian()); 用你的也不行
}
这个该是个小问题,可是搞不清楚问题在哪里 还是说05和03重载方法不一样?05不需要这个重载函数吗?