Pass any type of value from one view controller to another view controller in swift

let VC = CheckOutViewController(nibName: "CheckOutViewController", bundle: nil)
VC.arrCartList = self.arrCartList
VC.totalprice = self.totalprice
self.navigationController?.pushViewController(VC, animated: true)