how to prevent class 'a' from being inherited by another class?
In JAVA - use the final keyword:
public final class FDetails
In C# - the sealed keyword:
sealed class FDetails
java: final
vb: NotInheritable (NonOverrideable for properties)
c#: sealed
In C# you use the sealed
keyword in order to prevent a class from being inherited.
In VB.NET you use the NotInheritable
keyword.
In Java you use the keyword final
.
In Java use the final keyword:
public final class fdetails{
}
In C# use the sealed keyword:
public sealed class fdetails{
}
In VB.net use the NotInheritable keyword:
public notinheritable class fdetails
end class