Error Dispose(bool)': no suitable method found to override C#

Asked

Viewed 392 times

0

Já alterei o namespace, a classe está com o mesmo nome, porém continua o mesmo erro. Já não sei o que trocar

I’ve checked on other forums and even here, but that’s it correct with the class name o namespace is the same.

He caused me other mistakes besides this, but this I believe is the main one that is making the others occur.

Severity Code Description Project File Line Suppression State Error CS0115 'Issuers.Dispose(bool)': no suitable method found to override Severity Code Description Project File Line Suppression State Error CS0115 'Issuers.Dispose(bool)': no suitable method found to override

  • 1

    You are overriding a class method where it is being implemented, but there is no class to be implemented, so there is no overlapping.

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site.

  • I’ll follow the tour, thank you

1 answer

1

When you give a override means that this implementation will replace an existing one of the same method (same signature) that comes from the class or interface that this class is inheriting. But in his code the class is not making inheritance and so can not overwrite anything, he can not find a method to overwrite.

At least this is what can be inferred, It may be that lacks context in the question to identify some other problem.

Maybe it’s in another file like this partial, but the class declaration needs to be equal in all files.

This method belongs to the interface IDisposable then it is at least she who should inherit.

Other errors may or may not be related to this or other heritages, fixing this will make others appear.

But I get worried because this error is basic and this code is doing something quite sophisticated. Many problems can be happening there without error and your code will not be trusted without understanding everything about it. Reflect on the danger you are in.

  • Severity Code Description Project File Line Suppression State Error CS1061 'Issuers' does not contain a Definition for 'Resumelayout' and no Extension method 'Resumelayout' Accepting a first argument of type 'Issuers' could be found (are you Missing a using Directive or an Assembly Reference?). It brings this error in Resume Layout.

  • Yeah, there’s gonna be one mistake after another, that’s what I said, I solved what you posted. And there’s going to be a lot of others because it’s getting clearer that you’re using code without knowing what every word of it means, it doesn’t work.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.