Table of Contents

Class Song

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

Properties

Album

Gets the Album on which the Song appears.

public Album Album { get; }

Property Value

Album

Artist

Gets the Artist of the Song.

public Artist Artist { get; }

Property Value

Artist

Duration

public TimeSpan Duration { get; }

Property Value

TimeSpan

Genre

Gets the Genre of the Song.

public Genre Genre { get; }

Property Value

Genre

IsDisposed

public bool IsDisposed { get; }

Property Value

bool

IsProtected

public bool IsProtected { get; }

Property Value

bool

IsRated

public bool IsRated { get; }

Property Value

bool

Name

public string Name { get; }

Property Value

string

PlayCount

public int PlayCount { get; }

Property Value

int

Position

public TimeSpan Position { get; }

Property Value

TimeSpan

Rating

public int Rating { get; }

Property Value

int

TrackNumber

public int TrackNumber { get; }

Property Value

int

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Equals(Song)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Song song)

Parameters

song Song

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

~Song()

protected ~Song()

FromUri(string, Uri)

Returns a song that can be played via MediaPlayer.

public static Song FromUri(string name, Uri uri)

Parameters

name string

The name for the song. See Name.

uri Uri

The path to the song file.

Returns

Song

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator ==(Song, Song)

public static bool operator ==(Song song1, Song song2)

Parameters

song1 Song
song2 Song

Returns

bool

operator !=(Song, Song)

public static bool operator !=(Song song1, Song song2)

Parameters

song1 Song
song2 Song

Returns

bool