What Is the Equivalent of Java's Final in C#?
What Is the Equivalent of Java's Final in C#? 1 7 Answers the Final Keyword Has Several Usages in Java. It Corresponds to Both the Sealed and Readonly Keywords...
What is the equivalent of Java's final in C#?
7 Answers
The final keyword has several usages in Java. It corresponds to both the sealed and readonly keywords in C#, depending on the context in which it is used.
Must Read
Classes
To prevent subclassing (inheritance from the defined class):
Java
public final class MyFinalClass {...}
C#
public sealed class MyFinalClass {...}