View Single Post
Old 05-18-2008, 11:53 AM   #9 (permalink)
daat99
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

I know that this thread isn't supposed to be in this scope, but I also know that Vorspire want to learn so I decided to correct minor errors:

Quote:
Originally Posted by Vorspire View Post
A class is always an "object" but never "Always" derived from another class.
Every object is made from a class, but there are several classes that doesn't make objects (static classes can't be used to make objects).
Take for example the Utility.cs class from the core.
The class itself isn't static but all the methods inside it are static so making an object from that class won't serve any purpose.

Quote:
Originally Posted by Vorspire View Post
You can create your own "SuperClasses" that have no specific parents.
All the classes are derived (behind the scenes) from a single parent: the "object" class itself.
That why before .NET 2.0 (which introduced generics) we could have a list of "objects" and insert any kind of object from any class we want into them.
The list simply expected an object from type "object" (the class) and because every single class is derived from the "object" class then they all match the criteria (even int, double, bool...).
__________________
I always try to help
Sometimes, I don't know how....

My Web Page
Forum Rules
-------------------------------------------------------------
Extensive OWLTR System | Token System | World Teleporters
-------------------------------------------------------------
daat99 is offline   Reply With Quote