コード例 #1
0
ファイル: SingleBeat.cs プロジェクト: Sk41d/MidiGremlin
 /// <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);
     }
 }
コード例 #2
0
ファイル: SingleBeat.cs プロジェクト: Sk41d/MidiGremlin
 /// <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})");
 }