I've used the @Override in java and has come in quite handy. Is there anything similar in c#?
The C# compiler provides compile-time checking for method overrides, including checking if the method is actually overriding as you intended. You can indicate that a method should be overridden using the .NET override keyword.
In C#, you must use the override keyword to override functions.
If you use override without a matching virtual or abstract base function, you'll get a compiler error.
If you don't use override, and there is a matching base function, you'll get a compiler warning (unless you add new).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With