Microsoft. The core of the net cabinet is a public-type system.
Default base class for all classes of system. Object
Value Type reference type: pointer, a pointer to an object
What is packing and unpacking: mutual conversion between the value type and the reference type
Packing: Convert numeric type to reference type
Binning: Convert the reference type to the numeric type
Example: int Foo = 42;
Object bar = Foo; packing operation, no need to display and convert
Int foo2 = (INT) bar unpacking (display conversion is required) because an object can be converted to any type
All types of root: system. Object
All types are ultimately derived from the root class, so that each type has at least one set of common functions.
Four public methods are available for all types.
Bool equals () compares two object references to determine whether they are identical objects.
Int gethashcode () gets the hash of a specified objectCode.
Type GetType () is used in the reflection method to obtain the type information of a given object.
String tostring can overwrite the display string
Protected Methods
Void finalize () is called by the runtime environment. To clear the garbage before collection.
Object memberwiseclone indicates the "shortest copy" of the object ". If you copy a referenced object to another object, the referenced object is not copied.