1.

I Was Asked In Interview That If I Have Created A Class And I Don't Want The Class To Be Inherited By Any Other Members Without Me Which Key Or Function I Have To Use?

Answer»

VB: for CLASS NotInheritable [MyClass]
For METHOD: NotOverridable [MyMethod]
C# For class or method :sealed[MyClassMyMethod]{}

VB: for class NotInheritable [MyClass]
For method: NotOverridable [MyMethod]
C# For class or method :sealed[MyClassMyMethod]{}



Discussion

No Comment Found