Muistiinpano
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoja.
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoja.
'typeid' used on managed or WinRT type 'type', use 'operator' instead
Remarks
You cannot apply the typeid operator to a managed or WinRT type; use typeid instead.
Example
The following example generates C3185 and shows how to fix it:
// C3185a.cpp
// compile with: /clr
ref class Base {};
ref class Derived : public Base {};
int main() {
Derived ^ pd = gcnew Derived;
Base ^pb = pd;
const type_info & t1 = typeid(pb); // C3185
System::Type ^ MyType = Base::typeid; // OK
}