public override bool Equals(object obj) { if (obj is ScalarType) return (ScalarType)obj == this; else return base.Equals(obj); }