public async Task <string> GetLogContent() { try { CloudFileDirectory root = Share.GetRootDirectoryReference(); File = root.GetFileReference($"log_{DateTime.Now.ToString("dd_MM_yyyy")}.log"); string content; if (!await File.ExistsAsync()) { content = ""; } else { using (var memoryStream = new MemoryStream()) { await File.DownloadToStreamAsync(memoryStream); content = Encoding.UTF8.GetString(memoryStream.ToArray()); } } return(content); } catch (Exception ex) { throw ex; } }