ItemsToCultureInvariantString <TItem, TContainedValue>() where TItem : FormattableValue <TContainedValue> where TContainedValue : IEquatable <TContainedValue>, IComparable <TContainedValue>, IFormattable { AssertValid(); StringBuilder oStringBuilder = new StringBuilder(); foreach (Object oItem in this.Items) { Debug.Assert(oItem is FormattableValue <TContainedValue>); FormattableValue <TContainedValue> oFormattableValue = (FormattableValue <TContainedValue>)oItem; if (oStringBuilder.Length > 0) { oStringBuilder.Append('\t'); } oStringBuilder.Append( oFormattableValue.ToCultureInvariantString()); } return(oStringBuilder.ToString()); }
CompareTo ( Object otherObject ) { Debug.Assert(otherObject != null); Debug.Assert(otherObject is FormattableValue <TContainedValue>); AssertValid(); FormattableValue <TContainedValue> oOtherFormattableValue = (FormattableValue <TContainedValue>)otherObject; return(this.ContainedValue.CompareTo( oOtherFormattableValue.ContainedValue)); }