Java Final in C#

July 22nd, 2008 | by programming |

Final keywod for a java class, in c# is replaced by sealed keyword, which means that the class is not available for inheritance.
For variables final in java is the same as readonly in c#: values cannot be modified after initialization, however, they are stored as values.
const in c# is a compile-time constant, meaning that references to consts are replaced by their literal value at compile time, and not stored anywhere at runtime.

Post a Comment