public short getFormat(String format, boolean createIfNotFound) {for (FormatRecord r : formats) {if (r.getFormatString().equals(format)) {return (short)r.getIndexCode();}}if (createIfNotFound) {return (short)createFormat(format);}return -1;}

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;}
