I have a c# project which I am trying to convert into Delphi.
I have a function addcoord
public static byte[] addCoord(Coordinate C, int ID)
{
//Create an empty array of length 10
byte[] ret = new byte[10];
ret[0] = Convert.ToByte(newClass.Add);
ret[1] = Convert.ToByte(ID);
ret[2] = BitConverter.GetBytes(C.X)[0];
//High-Byte of uInt16 X
ret[3] = BitConverter.GetBytes(C.X)[1];
//Low-Byte of uInt16 Y
ret[4] = BitConverter.GetBytes(C.Y)[0];
//High-Byte of uInt16 Y
ret[5] = BitConverter.GetBytes(C.Y)[1];
ret[6] = C.Red;
ret[7] = C.Green;
ret[8] = C.Blue;
ret[9] = C.Master;
return ret;
}
is there any equivalent to this in Delphi?