winform播放音乐

string sound = Application.StartupPath +@"song123.wav"; //Application.StartupPath:程序exe所在的位置,也可以直接写一个音乐的路径
SoundPlayer player = new SoundPlayer(sound);

player.Load(); //把声音加载到内存
player.PlayLooping();//播放
player.Play();

仅限.wav格式

c#播放mp3文件

http://www.cnblogs.com/igrl/archive/2010/03/29/1699975.html

原文地址:https://www.cnblogs.com/shi2172843/p/5861306.html