The ‘extern’ keyword can either be used with a method or for assembly alias. When used with methods it specifies that the method body is externally defined in some unmanaged code (mostly specified with DllImport()). The following code demonstrates the extern method
[DllImport("User32.dll")] public static extern int MessageBox(int h, string m, string c, int type);
Here we specified that the method MessageBox() is defined in an external unmanaged DLL (user32.dll). Note that the method declaration ends with semicolon as it is body is not defined here. The method can later be used in the program just like any other method.
The extern keyword can also be used as assembly alias. It is useful when we want to use different versions of an assembly at the same time in a single assembly. You can look for its description in MSDN