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).
Error:
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";
player.PlayLooping();```
Archive from: https://stackoverflow.com/questions/59061383/how-to-play-background-music-on-console