h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

sealed -- C# Keyword

sealed  -- C# Keyword

  •  When applied to a class, the sealed modifier prevents other classes from inheriting from it.
  •   In the following example, class B inherits from class A, but no class can inherit from class B.


class A {}  
sealed class B : A {}

readonly -- C# Keyword

readonly -- C# Keyword
  •  The readonly keyword is a modifier that you can use on fields.
  •   When a field declaration includes a readonly modifier, assignments to the fields introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.
readonly <data Type> <var Name>;