C Convert Arraylist To Array Of Objects In Typescript W3schools