Equals() public method

Returns a indicating whether this instance is equal to the specified NetServ.Net.Json.IJsonString.
public Equals ( IJsonString other ) : bool
other IJsonString The value to compare.
return bool
示例#1
0
        /// <summary>
        /// Determines if the two <see cref="NetServ.Net.Json.JsonString"/>s are
        /// equal.
        /// </summary>
        /// <param name="a">The first JsonString.</param>
        /// <param name="b">The second JsonString.</param>
        /// <returns>True if the JsonStrings are equal, otherwise; false.</returns>
        public static bool Equals(JsonString a, JsonString b)
        {
            object ao = a;
            object bo = b;

            if(ao == bo)
                return true;
            if(ao == null || bo == null)
                return false;

            return a.Equals(b.Value);
        }
示例#2
0
 /// <summary>
 /// Equality operator.
 /// </summary>
 /// <param name="a">The first JsonString.</param>
 /// <param name="b">The second JsonString.</param>
 /// <returns>True if the JsonStrings are equal, otherwise; false.</returns>
 public static bool operator ==(JsonString a, JsonString b)
 {
     return(JsonString.Equals(a, b));
 }