Manas Ranjan Dash
What are the ways by which you can make sure that a class can not be inherited by other classes?
By Manas Ranjan Dash in ASP.NET on May 19 2010
  • Vipin Yadav
    Jun, 2010 3

    Only By Using the Sealed Class or by creating the Private Constructor of it.

    • 0
  • Syed Shakeer
    May, 2010 30

    1)By using Static Class

    2)By using Sealed Class.

    above both classes cannot be Inherited

    • 0
  • kiran adhLAKHA
    May, 2010 20

    sealed classes cannot be inherited by other classses. 

    • 0
  • Manas Ranjan Dash
    May, 2010 19

    i) make it sealed (C#)
    ii) Declare the constructor as private.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS