I am trying to convert a VB.NET code example over to C# regarding a byte array. This is to export a crystal report to PDF using an exporttostream method. This is how it looks in VB.NET.
Code:
Dim st as System.IO.Stream
st = invoiceDoc1.ExportToStream(ExportFormatType.PortableDocFormat)
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
*****line below is where I am having the problem converting to C#
Dim b(st.Length) As Byte
*********************************************************
st.Read(b,0,st.Length)
Response.BinaryWrite(b)
Response.End()