Convert PDF to hex string in .NET 4.7.2 for T-SQL insert statement
private string ConvertToHexString(string filePath) { byte[] contentAsBytes = File.ReadAllBytes(filePath); string contentAsHexString = BitConverter.ToString(contentAsBytes).Replace("-", ""); return contentAsHexString; }