C# Console.Beep

using System;

namespace ConsoleApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var hz = new[] { 392, 392, 440, 392, 523, 494, 392, 392, 440, 392, 587, 523, 392, 392, 784, 659, 523, 494, 440, 698, 698, 659, 523, 587, 523 };
            var time = new[] { 375, 125, 500, 500, 500, 1000, 375, 125, 500, 500, 500, 1000, 375, 125, 500, 500, 500, 500, 1000, 375, 125, 500, 500, 500, 1000 };
            for (int i = 0; i < 25; i++)
            {
                Console.Beep(hz[i], time[i]);
            }
            Console.ReadKey();
        }
    }
}
posted @ 2024-05-10 10:18  talentzemin  阅读(25)  评论(0编辑  收藏  举报