Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C3179

Error Message

an unnamed managed type is not allowed

All CLR classes and structs must have names.

The following sample generates C3179:

// C3179a.cpp
// compile with: /clr /c
typedef value struct { // C3179
// try the following line instead
// typedef value struct MyStruct {
   int i;
} V;

The following sample generates C3179:

// C3179b.cpp
// compile with: /clr:oldSyntax /c
#using <mscorlib.dll>
typedef __value struct {   // C3179
// try the following line instead
// typedef __value struct MyStruct {
   int i;
} V;

Community Additions

ADD
Show:
© 2015 Microsoft