I'm familiar with System.ValueType, how to use it, and so on.
But what "is" System.Type?
Can you extends System.Type, how would you do so and why, and so on?? Is there a "list of" all the System.type somewhere??
(Indeed ..... where would you find the documentation for, or explanation of, what that is??)
I'm afraid I know nothing about this sort of thing --- thanks!
asked May 23 '12 at 03:03 PM
As it can represent a class, there is no list, as there are infinite classes.
answered May 23 '12 at 03:26 PM
The Type class is part of .NET / Mono as well as System.ValueType ;)
The Type class is a meta class that is used to describe other classes / types. Every type in .NET has it's Type descriptor. This descriptor can be retrived via the typeof operator in C#
UnityScript (JS) seems to do that automatically as you can see when using GetComponent.
The Type class is the most important part of the reflection features of .NET / Mono. With it you can use a certain type in a more generic way. You can browse through the variables of a class, execute functions by a string name...
Every type in .NET is derived from System.Object. That's why every type (even int and float) have a ToString function and the GetType function. While the typeof operator returns the TypeObject for a given type, GetType returns the TypeObject at runtime dynamically.
answered May 23 '12 at 03:36 PM