text: public short GetFormat(String format, bool CreateIfNotFound){IEnumerator iterator;for (iterator = formats.GetEnumerator(); iterator.MoveNext(); ){FormatRecord r = (FormatRecord)iterator.Current;if (r.FormatString.Equals(format)){return (short)r.IndexCode;}}if (CreateIfNotFound){return (short)CreateFormat(format);}return -1;}