DataObject.SetAudio Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds data to the data object in the WaveAudio format.
SetAudio(Byte[]) |
Adds a Byte array to the data object in the WaveAudio format after converting it to a Stream. |
SetAudio(Stream) |
- Source:
- DataObject.cs
- Source:
- DataObject.cs
- Source:
- DataObject.cs
public:
virtual void SetAudio(cli::array <System::Byte> ^ audioBytes);
public virtual void SetAudio (byte[] audioBytes);
abstract member SetAudio : byte[] -> unit
override this.SetAudio : byte[] -> unit
Public Overridable Sub SetAudio (audioBytes As Byte())
Parameters
Exceptions
audioBytes
is null
.
Remarks
To retrieve audio data from the data object, first use the ContainsAudio method to determine whether the data object contains audio data before retrieving it with the GetAudioStream method.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- Source:
- DataObject.cs
- Source:
- DataObject.cs
- Source:
- DataObject.cs
public:
virtual void SetAudio(System::IO::Stream ^ audioStream);
public virtual void SetAudio (System.IO.Stream audioStream);
abstract member SetAudio : System.IO.Stream -> unit
override this.SetAudio : System.IO.Stream -> unit
Public Overridable Sub SetAudio (audioStream As Stream)
Parameters
Exceptions
audioStream
is null
.
Remarks
To retrieve audio data from the data object, first use the ContainsAudio method to determine whether the data object contains audio data before retrieving it with the GetAudioStream method.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: