Yes, I mean 'non-overridable'. Thanks for correction.
Could the sealed keyword be used for a user-defined function? I don't know
how to implement by using it. I want an equivalent to nonoverridable keyword
of vb. I would like to get a link or an example for that?
Yes. But if you define the method yourself it will be non-overridable
as long as you don't include the virtual keyword. sealed is only
needed if you want to prevent further overriding of an existing
virtual method.
I want an equivalent to nonoverridable keyword of vb.
Yes, I mean 'non-overridable'. Thanks for correction.
Could the sealed keyword be used for a user-defined function? I don't know
how to implement by using it. I want an equivalent to nonoverridable keyword
of vb. I would like to get a link or an example for that?
By default, methods can't be overridden unless they're already
overriding the same method in the base class. If you need to override
something and make sure that no-one overrides it further, you just use
the sealed modifier.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.