Answers for "how to play a sound c# console app"

C#
2

c# play sound

System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"c:\mywavfile.wav");
player.Play();
Posted by: Guest on September-23-2020
1

c# console play sound

// Soundplayer only works on the Windows OS, so check if system is windows:
if (OperatingSystem.IsWindows())
{
	SoundPlayer player = new SoundPlayer("song.wav");
    player.Load();
    player.PlayLooping();
}
Posted by: Guest on August-30-2021
0

c# play sound

System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"c:\mywavfile.wav");
player.Play();
Posted by: Guest on March-14-2022

C# Answers by Framework

Browse Popular Code Answers by Language