private Int16 ReadInt16(EDFField itemInfo) { string strInt = ReadAscii(itemInfo).Trim(); Int16 intResult = -1; try { intResult = Convert.ToInt16(strInt); } catch (Exception ex) { Console.WriteLine("Error, could not convert string to integer. " + ex.Message); } return(intResult); }
private string[] ReadMultipleAscii(EDFField itemInfo, int numberOfParts) { var parts = new List <string>(); for (int i = 0; i < numberOfParts; i++) { byte[] bytes = this.ReadBytes(itemInfo.AsciiLength); parts.Add(AsciiString(bytes)); } return(parts.ToArray()); }
private double[] ReadMultipleDouble(EDFField itemInfo, int numberOfParts) { var parts = new List <double>(); for (int i = 0; i < numberOfParts; i++) { byte[] bytes = this.ReadBytes(itemInfo.AsciiLength); string ascii = AsciiString(bytes); parts.Add(Convert.ToDouble(ascii)); } return(parts.ToArray()); }
private string ReadAscii(EDFField itemInfo) { byte[] bytes = this.ReadBytes(itemInfo.AsciiLength); return(AsciiString(bytes)); }
public VariableLengthDouble(EDFField info) : base(info) { }
public HeaderItem(EDFField info) { Name = info.Name; AsciiLength = info.AsciiLength; }
public VariableLengthInt(EDFField info) : base(info) { }
public VariableLengthString(EDFField info) : base(info) { }
public FixedLengthDouble(EDFField info) : base(info) { }
public FixedLengthInt(EDFField info) : base(info) { }
public FixedLengthString(EDFField info) : base(info) { }