Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
An extern alias declaration must precede all other elements defined in the namespace
This error occurs when an extern declaration comes after something else, such as a using declaration, in the same namespace. The extern declarations must come before all other namespace elements.
Example
The following example generates CS0439:
// CS0439.cs
using System;
extern alias MyType; // CS0439
// To resolve the error, make the extern alias the first line in the file.
public class Test
{
public static void Main()
{
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.