Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0439 

Error Message

An extern alias declaration must precede all other namespace elements

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() 
    {
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft