/// <summary> /// Compare another object. If both objects are the same, then return zero. /// If this object has a value but the other object does not, return +1 /// If this object does not have a value, but the other object does have a value, /// return -1. If both objects have a value, the return value will be /// an indication of their relative values /// </summary> public int CompareTo(object obj) { NullableLong other = (NullableLong)obj; if (mHasValue) { if (other.mHasValue) { return(mValue.CompareTo(other.mValue)); } else { return(1); } } else if (other.mHasValue) { return(-1); } else { return(0); } }
public bool tryI64( MamaFieldDescriptor descriptor, ref NullableLong result) { return tryI64(null, (ushort)descriptor.getFid(), ref result); }
/// <overloads>Try to get a signed 64-bit integer field</overloads> public bool tryI64( string name, ushort fid, ref NullableLong result) { long val = 0; bool ret = tryI64(name, fid, ref val); if (ret) { result.Value = val; } return ret; }