Nata
Norint pasiekti šį puslapį, reikalingas leidimas. Galite pabandyti prisijungti arba pakeisti katalogus.
Norint pasiekti šį puslapį, reikalingas leidimas. Galite pabandyti pakeisti katalogus.
'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
}