How to play background music on console in c#? [closed]

I have been trying to add music to my console, but whenever I try to access SoundPlayer it shows this error(I am using Console in c# on Visual Basic btw).


The type name ‘SoundPlayer’ could not be found in the namespace ‘System.Media’. This type has been forwarded to assembly ‘System.Windows.Extensions

This is what I have:

System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.SoundLocation = "User Login Assignment - Mustafa Abdulrahman\personaost.wav";

Archive from:


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *