.net core c# webrequest download

C#
            byte[] listeByte;
            try
            {
                
                FtpWebRequest requestFichier = (FtpWebRequest)WebRequest.Create(@filePath);
                requestFichier.Credentials = new NetworkCredential(utilisateur, motDePasse);
                requestFichier.Method = WebRequestMethods.Ftp.DownloadFile;
                using (WebResponse response = await requestFichier.GetResponseAsync())
                {
                    using (MemoryStream ms = new MemoryStream())
                    {
                        response.GetResponseStream().CopyTo(ms);
                        listeByte = ms.ToArray();
                    }
                }
            }
            catch (Exception ex)
            {
               throw ex;
            }

            return listeByte;
Source

Also in C#: