Back to monogame.net
Show / Hide Table of Contents

Class Song

Inheritance
Object
Song
Implements
IDisposable
IEquatable<Song>
Namespace: Microsoft.Xna.Framework.Media
Assembly: MonoGame.Framework.dll
Syntax
public sealed class Song : IEquatable<Song>

Properties

Album

Gets the Album on which the Song appears.

Declaration
public Album Album { get; }
Property Value
Type Description
Album

Artist

Gets the Artist of the Song.

Declaration
public Artist Artist { get; }
Property Value
Type Description
Artist

Duration

Declaration
public TimeSpan Duration { get; }
Property Value
Type Description
TimeSpan

Genre

Gets the Genre of the Song.

Declaration
public Genre Genre { get; }
Property Value
Type Description
Genre

IsDisposed

Declaration
public bool IsDisposed { get; }
Property Value
Type Description
Boolean

IsProtected

Declaration
public bool IsProtected { get; }
Property Value
Type Description
Boolean

IsRated

Declaration
public bool IsRated { get; }
Property Value
Type Description
Boolean

Name

Declaration
public string Name { get; }
Property Value
Type Description
String

PlayCount

Declaration
public int PlayCount { get; }
Property Value
Type Description
Int32

Rating

Declaration
public int Rating { get; }
Property Value
Type Description
Int32

TrackNumber

Declaration
public int TrackNumber { get; }
Property Value
Type Description
Int32

Methods

Dispose()

Declaration
public void Dispose()

Equals(Song)

Declaration
public bool Equals(Song song)
Parameters
Type Name Description
Song song
Returns
Type Description
Boolean

Equals(Object)

Declaration
public override bool Equals(Object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean

Finalize()

Declaration
protected void Finalize()

FromUri(String, Uri)

Returns a song that can be played via MediaPlayer.

Declaration
public static Song FromUri(string name, Uri uri)
Parameters
Type Name Description
String name

The name for the song. See Name.

Uri uri

The path to the song file.

Returns
Type Description
Song

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

Operators

Equality(Song, Song)

Declaration
public static bool operator ==(Song song1, Song song2)
Parameters
Type Name Description
Song song1
Song song2
Returns
Type Description
Boolean

Inequality(Song, Song)

Declaration
public static bool operator !=(Song song1, Song song2)
Parameters
Type Name Description
Song song1
Song song2
Returns
Type Description
Boolean

Implements

IDisposable
IEquatable<>
In This Article
Back to top

© 2012 Microsoft Corporation. All rights reserved.

© The MonoGame Team.