הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
to use type 'type' you must reference the assembly 'assembly'
Remarks
Type forwarding will work for a client application until you recompile the client. When you recompile, you will need a reference for every assembly containing the definition of a type used in your client application.
For more information, see Type Forwarding (C++/CLI).
Example
The following example builds an assembly that contains the new location of a type.
// C3465.cpp
// compile with: /clr /LD
public ref class R {
public:
ref class N {};
};
The following example builds an assembly that used to contain the definition of the type, but now contains forwarding syntax for the type.
// C3465_b.cpp
// compile with: /clr /LD
#using "C3465.dll"
[ assembly:TypeForwardedTo(R::typeid) ];
The following example generates C3465.
// C3465_c.cpp
// compile with: /clr
// C3465 expected
#using "C3465_b.dll"
// Uncomment the following line to resolve.
// #using "C3465.dll"
int main() {
R^ r = gcnew R();
}