コード例 #1
0
ファイル: Showtime.cs プロジェクト: davidov541/SAMI
 /// <summary>
 /// Returns true if this object equals the value passed in.
 /// </summary>
 /// <param name="s">Other object to compare to.</param>
 /// <returns>True if this == obj, false otherwise.</returns>
 public bool Equals(Showtime s)
 {
     // Return true if all fields match:
     return(MovieTitle.Equals(s.MovieTitle) &&
            Theater.Equals(s.Theater) &&
            Time.Equals(s.Time));
 }
コード例 #2
0
ファイル: Showtime.cs プロジェクト: davidov541/SAMI
        /// <summary>
        /// Returns true if this object equals the value passed in.
        /// </summary>
        /// <param name="obj">Other object to compare to.</param>
        /// <returns>True if this == obj, false otherwise.</returns>
        public override bool Equals(Object obj)
        {
            // If parameter cannot be cast to ThreeDPoint return false:
            Showtime s = obj as Showtime;

            if (s == null)
            {
                return(false);
            }

            return(Equals(s));
        }