摘要:
extern修饰符用于声明在外部实现的方法。extern 修饰符的常见用法是在使用 Interop 服务调入非托管代码时与 DllImport 属性一起使用;在这种情况下,该方法还必须声明为 static,如下面的示例所示:[DllImport("mpr.dll")] public static extern WNetAddConnection2ReturnCode WNetAddConnection2(ref NetResource netResource, string strPassword, string strUserName, ConnectionOption 阅读全文