Stofdeel,
| I am looking for information about the System.RuntimeType and other
Runtime
| classes.
Why? System.RuntimeType is a specific implementation of System.Type. You
should be programming to the public "contract" of System.Type, not the
private implementation details of System.RuntimeType.
| They are undocumented in my version of Visual Studio. So far I have
| no luck with internet, only some remarks:
IMHO RuntimeType is undocumented as it is an implementation detail of the
Framework, i.e. it encapsulates the "runtime" implementation of a Type.
Remember that Encapsulation is one of the tenants of OO.
| - All .NET classes are instances of System.RuntimeType.
That is not really true, I would say most .NET System.Type instances are
instances of System.RuntimeType. I don't remember if when you load a type
for with System.Reflection if its still a System.RuntimeType or another
concrete Type. Although I don't have specific examples, I would expect there
may be other private specific implementations of System.Type, as System.Type
is MustInherit (abstract) after all.
In other words I would not (*do not*) expect that all System.Type variables
are of type System.RuntimeType.
| - RuntimeType is the basic Type object representing classes as found in
the
| system.
I would agree to a point, ergo an Encapsulated Implementation Detail. As I
suggested earlier I would program to System.Type and not be concerned with
what System.RuntimeType is.
For example: consider the System.IO.Stream.Null property. If you look at the
object return it has type System.IO.Stream.NullStream. NullStream is not
documented as it is an implementation detail of the Stream.Null property.
All one really needs to know is that Stream.Null returns an implementation
of Stream that behaves like a stream...
| - This type is never creatable by users, only by the system itself.
Again I would agree, ergo an Encapsulated Implementation Detail
| - __RuntimeXXX classes are created only once per object in the system
| and
| support == comparisons.
Do you mean reference equality (Is operator), or identity equality (=
operator). As == is an C# operator that could mean either.
I don't see that Identity equality is supported as: I don't see operator =
overloaded, nor System.Equals overridden, nor IComparable implement.
Of course reference equality is supported as specific types are effectively
singletons...
--
Hope this helps
Jay [MVP - Outlook]
T.S. Bradley -
http://www.tsbradley.net
"Stofdeel" <NO****@NOSPAM.nl> wrote in message
news:ZM********************@casema.nl...
| Heya,
|
| I am looking for information about the System.RuntimeType and other
Runtime
| classes. They are undocumented in my version of Visual Studio. So far I
have
| no luck with internet, only some remarks:
|
| - All .NET classes are instances of System.RuntimeType.
|
| - RuntimeType is the basic Type object representing classes as found in
the
| system.
|
| - This type is never creatable by users, only by the system itself.
|
| - The internal structure is known about by the runtime.
|
| - __RuntimeXXX classes are created only once per object in the system and
| support == comparisions.
|
|
| Any links would be helpfull,
|
| Thanks.
|
|