/// <summary> /// Constructs an ANAME record by reading bytes from a return message /// </summary> /// <param name="pointer">A logical pointer to the bytes holding the record</param> internal ANameRecord(Pointer pointer) { byte b1 = pointer.ReadByte(); byte b2 = pointer.ReadByte(); byte b3 = pointer.ReadByte(); byte b4 = pointer.ReadByte(); // this next line's not brilliant - couldn't find a better way though _ipAddress = IPAddress.Parse(string.Format("{0}.{1}.{2}.{3}", b1, b2, b3, b4)); }
/// <summary> /// Constructs an ANAME record by reading bytes from a return message /// </summary> /// <param name="pointer">A logical pointer to the bytes holding the record</param> internal AAAARecord(Pointer pointer) { byte b1 = pointer.ReadByte(); byte b2 = pointer.ReadByte(); byte b3 = pointer.ReadByte(); byte b4 = pointer.ReadByte(); byte b5 = pointer.ReadByte(); byte b6 = pointer.ReadByte(); byte b7 = pointer.ReadByte(); byte b8 = pointer.ReadByte(); // this next line's not brilliant - couldn't find a better way though _ipAddress = IPAddress.Parse(string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}:{7}", b1, b2, b3, b4, b5, b6, b7, b8)); }