Compiler Warning (level 1) CS0824

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.

Example

The following code generates CS0824:

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

See Also

Reference

extern (C# Reference)

#pragma warning (C# Reference)