using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace BeepTest
{
class Program
{
[DllImport("kernel32.dll")]
public static extern bool Beep(int frequency, int duration);
static void Main(string[] args)
{
Random random = new Random();
for (int i=0; i < 10000; i++)
{
Beep(random.Next(10000), 100);
}
}
}
}
还是不会用,c#调用WindowsAPI,怎样才算会,怎样才算懂