If you want to redirect a class reference to another assembly using Forward Forwarding, should this class inherit from Type?
No.
I guess I really am - What does this mean or what is indicated by the word "Type" in the phrase and the term "Type Forwarding".
Suppose you have a Foo type in the Alpha assembly, and in the next version you realize that Foo really should have been in the Bravo assembly. You cannot move this type because all of your clients that have dependencies on Foo located in Alpha will be broken.
The solution is to move the Foo type to Bravo, and then send a new version of Alpha that contains a type forwarder that tells Alpha users "if you are looking for Foo, it is now found in Bravo." This way you will not break anyone who depends on how they are used to being.
I think I'm missing here, it is that the definition of Type refers to the concept of Type Forwarding. What qualifies as a type?
The following are type definitions:
- non-generic or non-constructed generic classes, structures, interfaces, and delegates
- transfers
The links to types are listed below (they all refer to another type, none of them defines something new.)
- constructed common classes, structures, interfaces, and delegates
- arrays
- Pointers
- nullables
(And there is one type that does not fall into any category, which is the return type of "void".)
Of all these types, only type definitions can be redirected. The purpose of a type forwarder is to indicate that "the type that was previously defined by this assembly is now defined by this assembly," so it makes sense to redirect the type definition. You cannot redirect type MyStruct<int>[] ; it makes no sense. You can forward MyStruct<T> .
what do you mean by "unconstructed generic classes? Does this mean only a general definition, and not a general definition that was created with the specified type?
Right.
And can you tell me where you found the information for "type references" and "type definitions"?
These are not concepts from the C # language specification; rather, these are concepts from a basic system such as Common Language Infrastructure. For a detailed technical analysis of how the CLI differs between defined and reference types, read the ECI 335 CLI specification, in particular, look for sections in the metadata tables for TypeDef and TypeRef.