How can we main a Class as base class,i.e not inherited
further?{please Dont tell using Sealed class,any other way}
Answers were Sorted based on User's Feedback
Answer / suman k dey
Instead of sealed we can use static class.
Is This Answer Correct ? | 17 Yes | 3 No |
Answer / palash
Very Simple....
Create one private Constructor inside the class then we are
not create any object of that class.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / jay
final is an identifier valid in java, c# has sealed.
while its true that marking base CTOR as private makes
deriving from that class impossible, you SHOULD use sealed
for that purpose.
Reason is that "sealed" allows for some neat compiler
optimization.
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / arun
using final keyword....i am not sure whether this works in
c# or not...
Is This Answer Correct ? | 0 Yes | 4 No |
what is IEquatable
Can we override interface method?
What is difference between ienumerable and ienumerator in c#?
What is the purpose of private constructor in c#?
What are anonymous types in c#?
What is a decimal in c#?
In a site to turn off cookies for one page which method is followed?
WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)
How is a strongly-named assembly different from one that isn’t strongly-named?
What is COM Interoperability?
What is console based application?
One start and stop button is there and one textbox is there.when you click start button ,it will display 1,2,3......up to infinite in textbox.when you click stop button it will stop.