Jump to content

Issues with Form in Visual Studio, C#

I am having issues with the Visual Studio and Forms as I keep getting this error code

 

CS0115    '_.Dispose(bool)': no suitable method found to override

 

I think I caused it by changing the forms name, but it means my programme no longer works. Is there an easy way to fix this as I want it to be called what it is called.

 

Thanks

The owner of "too many" computers, called

The Lord of all Toasters (1920X 1080ti 32GB)

The Toasted Controller (i5 4670, R9 380, 24GB)

The Semi Portable Toastie machine (i7 3612QM (was an i3) intel HD 4000 16GB)'

Bread and Butter Pudding (i7 7700HQ, 1050ti, 16GB)

Pinoutbutter Sandwhich (raspberry pi 3 B)

The Portable Slice of Bread (N270, HAHAHA, 2GB)

Muffinator (C2D E6600, Geforce 8400, 6GB, 8X2TB HDD)

Toastbuster (WIP, should be cool)

loaf and let dough (A printer that doesn't print black ink)

The Cheese Toastie (C2D (of some sort), GTX 760, 3GB, win XP gaming machine)

The Toaster (C2D, intel HD, 4GB, 2X1TB NAS)

Matter of Loaf and death (some old shitty AMD laptop)

windybread (4X E5470, intel HD, 32GB ECC) (use coming soon, maybe)

And more, several more

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, grimreeper132 said:

I am having issues with the Visual Studio and Forms as I keep getting this error code

 

CS0115    '_.Dispose(bool)': no suitable method found to override

 

I think I caused it by changing the forms name, but it means my programme no longer works. Is there an easy way to fix this as I want it to be called what it is called.

 

Thanks

You screwed up something in the InitializeComponents(); Or you changed the class name in the code and not through the refactor.

 

If it's a case of refractor you probably didn't noticed but all forms are Partial class so there is a secondary class hidden with the same name. You need to change both. click the little plus sign in the treeview and you should see a .designer.cs file with your form. Edit that code and make sure the class name also match

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×