Search Results for

    Show / Hide Table of Contents

    Class IntervalDefinition

    Definition of a musical interval which is number and quality.
    Inheritance
    object
    IntervalDefinition
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.MusicTheory
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class IntervalDefinition

    Constructors

    IntervalDefinition(int, IntervalQuality)

    Initializes a new instance of the IntervalDefinition with the specified interval number and quality.
    Declaration
    public IntervalDefinition(int number, IntervalQuality quality)
    Parameters
    Type Name Description
    int number Interval number.
    IntervalQuality quality Interval quality.
    Exceptions
    Type Condition
    ArgumentOutOfRangeException number is less than 1.
    InvalidEnumArgumentException quality specified an invalid value.

    Properties

    Number

    Gets the interval number.
    Declaration
    public int Number { get; }
    Property Value
    Type Description
    int

    Quality

    Gets the interval quality.
    Declaration
    public IntervalQuality Quality { get; }
    Property Value
    Type Description
    IntervalQuality

    Methods

    Equals(object)

    Determines whether the specified object is equal to the current object.
    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj The object to compare with the current object.
    Returns
    Type Description
    bool true if the specified object is equal to the current object; otherwise, false.
    Overrides
    object.Equals(object)

    GetHashCode()

    Serves as the default hash function.
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int A hash code for the current object.
    Overrides
    object.GetHashCode()

    ToString()

    Returns a string that represents the current object.
    Declaration
    public override string ToString()
    Returns
    Type Description
    string A string that represents the current object.
    Overrides
    object.ToString()

    Operators

    operator ==(IntervalDefinition, IntervalDefinition)

    Determines if two IntervalDefinition objects are equal.
    Declaration
    public static bool operator ==(IntervalDefinition intervalDefinition1, IntervalDefinition intervalDefinition2)
    Parameters
    Type Name Description
    IntervalDefinition intervalDefinition1 The first IntervalDefinition to compare.
    IntervalDefinition intervalDefinition2 The second IntervalDefinition to compare.
    Returns
    Type Description
    bool true if the interval definitions are equal, false otherwise.

    operator !=(IntervalDefinition, IntervalDefinition)

    Determines if two IntervalDefinition objects are not equal.
    Declaration
    public static bool operator !=(IntervalDefinition intervalDefinition1, IntervalDefinition intervalDefinition2)
    Parameters
    Type Name Description
    IntervalDefinition intervalDefinition1 The first IntervalDefinition to compare.
    IntervalDefinition intervalDefinition2 The second IntervalDefinition to compare.
    Returns
    Type Description
    bool false if the interval definitions are equal, true otherwise.
    In this article
    Back to top 2024 / Generated by DocFX