Export (0) Print
Expand All
Expand Minimize

Compiler Warning (level 1) CS0824

Visual Studio 2008

Constructor 'name' is marked external.

A constructor may be marked as extern. However, the compiler cannot verify that the constructor actually exists. Therefore the warning is generated.

To remove this warning

  1. Use a pragma warning directive to ignore it.

  2. Move the constructor inside the type.

The following code generates CS0824:

// cs0824.cs
public class C
{
    extern C(); // CS0824
    public static int Main()
    {
        return 1;
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft