Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

Answer / suman k dey

Instead of sealed we can use static class.

Is This Answer Correct ?    17 Yes 3 No

How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

Answer / vinay tiwari

by making private cnstructor

Is This Answer Correct ?    10 Yes 2 No

How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

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

How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

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

How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

Answer / arun

using final keyword....i am not sure whether this works in
c# or not...

Is This Answer Correct ?    0 Yes 4 No

How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed cla..

Answer / saurabh hoonka

use Private access modifier

Is This Answer Correct ?    0 Yes 5 No

Post New Answer



More C Sharp Interview Questions

What is enum in c#?

0 Answers  


What is a proxy of the server object in .NET Remoting?

0 Answers   BirlaSoft,


Can we extend static class in c#?

0 Answers  


Define multicast delegate in c#?

0 Answers  


Why do we use interface in c#?

0 Answers  






What is uint64_t?

0 Answers  


What's the difference between a static method and a non static method c#?

0 Answers  


In a site to turn off cookies for one page which method is followed?

0 Answers   Siebel,


Can we declare private class in c#?

0 Answers  


What is parsing? How to parse a date time string?

0 Answers  


Can you change the value of a variable while debugging a C# application?

1 Answers   Siebel Systems, Wipro,


Name which controls do not have events?

0 Answers  






Categories