示例#1
0
        public static bool TryParse(string value, out ObjectId id)
        {
            id = Empty;
            if (value == null || value.Length != 24)
            {
                return false;
            }

            try
            {
                id = new ObjectId(value);
                return true;
            }
            catch (FormatException)
            {
                return false;
            }
        }
示例#2
0
 public bool Equals(ObjectId other)
 {
     return other != null && ToString() == other.ToString();
 }