protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssStringVariable other = spssVar as SpssStringVariable; if (other == null) throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); other.Length = Length; this.valueLabels.CopyTo(other.valueLabels); }
protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssNumericVariable other = spssVar as SpssNumericVariable; if (other == null) { throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); } other.PrintDecimal = this.PrintDecimal; other.PrintFormat = this.PrintFormat; other.PrintWidth = this.PrintWidth; other.WriteDecimal = this.WriteDecimal; other.WriteFormat = this.WriteFormat; other.WriteWidth = this.WriteWidth; other.MissingValueFormat = this.MissingValueFormat; other.MissingValues = new List<double>(this.MissingValues); this.valueLabels.CopyTo(other.valueLabels); }
/// <summary> /// Copies the fields from this variable into another previously created /// <see cref="SpssVariable"/>. /// </summary> protected virtual void CloneTo(SpssVariable other) { if (other == null) throw new ArgumentNullException("other"); other.Name = Name; other.Label = Label; other.ColumnWidth = ColumnWidth; }