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 [...]
Posts Tagged ‘extern’
extern Keyword
Posted in .Net Articles, C#, tagged extern on July 18, 2008 | Leave a Comment »