Clone() public method

The clone.
public Clone ( ) : IBaseObject
return IBaseObject
        /// <summary>
        /// Initializes a new instance of the <see cref="ValueNote"/> class.
        /// </summary>
        /// <param name="pitch">
        /// The pitch.
        /// </param>
        /// <param name="duration">
        /// The duration.
        /// </param>
        /// <param name="triplet">
        /// The triplet.
        /// </param>
        /// <param name="tie">
        /// The tie.
        /// </param>
        /// <param name="priority">
        /// The priority.
        /// </param>
        public ValueNote(Pitch pitch, Duration duration, bool triplet, Tie tie, int priority = -1)
        {
            Pitch = new List<Pitch>(0);

            // если не пауза то записываем высоту и наличие лиги
            if (pitch != null)
            {
                Pitch.Add((Pitch)pitch.Clone());
                Tie = tie;
            }
            else
            {
                // если нота - пауза, то не может быть лиги на паузу
                Tie = Tie.None;
            }

            Duration = (Duration)duration.Clone();
            Triplet = triplet;

            // приоритет если указан
            Priority = priority;
        }
 /// <summary>
 /// The sub duration.
 /// </summary>
 /// <param name="duration">
 /// The duration.
 /// </param>
 /// <returns>
 /// The <see cref="Duration"/>.
 /// </returns>
 public Duration SubDuration(Duration duration)
 {
     var temp = (Duration)duration.Clone();
     temp.Ticks = -temp.Ticks;
     temp.Numerator = -temp.Numerator;
     return AddDuration(temp);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ValueNote"/> class.
        /// </summary>
        /// <param name="midiNumbers">
        /// The midi numbers.
        /// </param>
        /// <param name="duration">
        /// The duration.
        /// </param>
        /// <param name="triplet">
        /// The triplet.
        /// </param>
        /// <param name="tie">
        /// The tie.
        /// </param>
        /// <param name="priority">
        /// The priority.
        /// </param>
        public ValueNote(List<int> midiNumbers, Duration duration, bool triplet, Tie tie, int priority = -1)
        {
            Pitch = new List<Pitch>();
            foreach (var midinumber in midiNumbers)
            {
                Pitch.Add(new Pitch(midinumber));
            }

            Tie = tie;
            Duration = (Duration)duration.Clone();
            Triplet = triplet;
            Priority = priority;
        }