Stop Method

SoundPlayer.Stop Method ()


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
© 2015 Microsoft