.

playing sound in C# (winforms)

<code><span class="pln">playing sound in C# (winforms)<br /><br /></span></code><code><span class="pln"></span></code><pre class="brush: c-sharp;">try
    {
        (new SoundPlayer(@"/Project;component/sounds/pacman.wav")).Play();
    }
    catch (Exception ex)
    {
        Console.Error.WriteLine(ex.Message);
    }


What's your thoughts on this?

*

Protected by WP Anti Spam