.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Why System.Object class is not made abstract?
 

Why System.Object class is not made abstract?

Whats will the problem if Object class is made abstract?
Yuvraj A Ajatshatru
You wouldn't be able to box anymore. The framework would stop working.

Hans Passant.
nobugz
One point of an abstract class is that it has some methods/properties that needs to be implemented in derived classes (not a requirement, but very common). The Object class has no such methods/properties. Therefore it makes no sense to let it be abstract.

Also, sometimes it is convenient to have an object that is nothing else but an object. This is very useful for thread syncronization, or for indicating that a reference type variable is something else than null.

I don't think it would be a problem to haveit as abstract, but there is no reason why it should be.

Theseare only my opinions. Maybe the MS guys have some other...

Tor-Odd Connelly
Tor-Odd
One point of an abstract class is that it has some methods/properties that needs to be implemented in derived classes (not a requirement, but very common). The Object class has no such methods/properties. Therefore it makes no sense to let it be abstract.

Also, sometimes it is convenient to have an object that is nothing else but an object. This is very useful for thread syncronization, or for indicating that a reference type variable is something else than null.

I don't think it would be a problem to haveit as abstract, but there is no reason why it should be.

Theseare only my opinions. Maybe the MS guys have some other...

Tor-Odd Connelly
Tor-Odd
You wouldn't be able to box anymore. The framework would stop working.

Hans Passant.
nobugz

You can use google to search for other answers

Custom Search

More Threads

• How do I create a nested class with CodeDom?
• hi
• Thread Safety different for different hash tables / dictionaries.
• Error occured when i am using com objects
• Find method in Generic List. c# syntax in VB.NET
• How to get peak private memory size?
• Help on UserControl for simple value / unit editing
• What is the MS version of "Ajax techniques"?
• Integrating .Net 2.0 with a configuration server
• How do I import a text doc into VB.net