Esempio n. 1
0
        /// <summary>
        /// Comares if two VersionNumber objects are the same
        /// </summary>
        /// <param name="aObj">
        /// Object to compare with <see cref="System.Object"/>
        /// </param>
        /// <returns>
        /// Returns true if equal <see cref="System.Boolean"/>
        /// </returns>
        /// <remarks>
        /// For compare can be used either string or VersionNumber
        /// otherwise it simply returns false
        /// </remarks>
        public override bool Equals(object aObj)
        {
            VersionNumber ver;

            if (aObj is VersionNumber)
            {
                ver = (VersionNumber)aObj;
                return(this == ver);
            }

            if (aObj is string)
            {
                ver = new VersionNumber((string)aObj);
                bool res = (this == ver);
                return(res);
            }

            return(false);
        }
		/// <summary>
		/// Comares if two VersionNumber objects are the same
		/// </summary>
		/// <param name="aObj">
		/// Object to compare with <see cref="System.Object"/>
		/// </param>
		/// <returns>
		/// Returns true if equal <see cref="System.Boolean"/>
		/// </returns>
		/// <remarks>
		/// For compare can be used either string or VersionNumber
		/// otherwise it simply returns false
		/// </remarks>
		public override bool Equals (object aObj)
		{
			VersionNumber ver;
			if (aObj is VersionNumber) {
				ver = (VersionNumber) aObj;
				return (this == ver);
			}

			if (aObj is string) {
				ver = new VersionNumber ((string) aObj);
				bool res = (this == ver);
				return (res);
			}

			return (false);
		}