打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
导入某个特定的DLL,然后就可以使用里面的API,


For example,

using System;
using System.Runtime.InteropServices;
class MainClass 
{
    [DllImport("User32.dll")]
    public static extern int MessageBox(int h, string m, string c, int type);

    static int Main() 
    {
        string myString; 
        Console.Write("Enter your message: ");
        myString = Console.ReadLine();
        return MessageBox(0, myString, "My Message Box", 0);
    }
}
  
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
extern \调用系统API
<font style="vertical-align: inherit;"><font style="vertical-align: inherit;">外部(C#参考) | </font><font style="vertical-align: inherit;">微软
extern(C# 参考)
C# Left, Right and Mid函数
C#优化字符串操作
c# – 将字符串分隔到不在集合字典中的列表中
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服