Exemple #1
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)instrumentType;
         hashCode = (hashCode * 397) ^ Tone.GetHashCode();
         hashCode = (hashCode * 397) ^ ToneVelocity.GetHashCode();
         hashCode = (hashCode * 397) ^ ToneStartTime.GetHashCode();
         hashCode = (hashCode * 397) ^ ToneEndTime.GetHashCode();
         return(hashCode);
     }
 }
Exemple #2
0
 /// <summary>
 /// Returns the fully qualified type name of this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String"/> containing a fully qualified type name.
 /// </returns>
 public override string ToString()
 {
     return($"{ToneStartTime.ToString().PadRight(7)} -> {ToneEndTime.ToString().PadRight(7)} ({Tone}, {ToneVelocity}) ({instrumentType})");
 }