SoundPlayer.Stop Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Stops playback of the sound if playback is occurring.

Namespace:   System.Media
Assembly:  System (in System.dll)

public void Stop()

The following code example demonstrates the use of the Stop method to halt a .wav file that is currently playing. This code example is part of a larger example provided for the SoundPlayer class.

ReportStatus("Stopped by user.");


for access to native code. Associated enumeration: UIPermissionWindow.SafeSubWindows

.NET Framework
Available since 2.0
Return to top