コード例 #1
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object" />, is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(System.Object obj)
        {
            // If parameter cannot be cast to ThreeDPoint return false:
            SuccubusAssembly assembly = obj as SuccubusAssembly;

            if ((object)assembly == null || !(obj is SuccubusAssembly))
            {
                return(false);
            }
            // Return true if the fields match:
            Boolean sameName    = this.Name == ((SuccubusAssembly)obj).Name,
                    sameVersion = this.IsSameVersion(this.Version, ((SuccubusAssembly)obj).Version);

            return(sameName && sameVersion);
        }
コード例 #2
0
 /// <summary>
 /// Equalses the specified assembly.
 /// </summary>
 /// <param name="assembly">The assembly.</param>
 /// <returns>True if both assemblies are equals</returns>
 public bool Equals(SuccubusAssembly assembly)
 {
     // Return true if the fields match:
     return(this.Equals((object)assembly));
 }