'type': could not convert to System::Type*
An attempt was made to use the typeof operator on an unmanaged type.
The following sample generates C3742:
#using <mscorlib.dll> using namespace System; __nogc struct MyStruct { }; // try the following lines instead // __gc struct MyStruct { // }; [attribute(All)] __gc struct AtClass { AtClass(System::Type*) { } AtClass(String*) { } AtClass(int) { } }; [AtClass(typeof(MyStruct))] struct B { // C3742 }; void main() { }