Hi reders , i know how to impliment d Audio code in vb ,but i'm not getting in C# ,plz any bady know help me how to impliment in c#


Vb code : My.Computer.Audio.Play("Path")
C# code :..............?

There is a simple code to play an audio file pass path of your file in String s

using System.Media;
public void player(String s)
        {
            SoundPlayer mplayer = new SoundPlayer();
            mplayer.SoundLocation = s;
            mplayer.Play();
        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.