Only By Using the Sealed Class or by creating the Private Constructor of it.
1)By using Static Class
2)By using Sealed Class.
above both classes cannot be Inherited
sealed classes cannot be inherited by other classses.
i) make it sealed (C#)ii) Declare the constructor as private.