Rückkehr Byte-Array

Habe ich die folgende Funktion (in ein WCF)

Public Function GetPDF_Byte() As Byte Implements IService1.GetPDF_Byte
    Dim fs As New FileStream("C:\My.pdf", FileMode.Open, FileAccess.Read)

    Dim ImageData As Byte() = New Byte(fs.Length - 1) {}

    fs.Read(ImageData, 0, System.Convert.ToInt32(fs.Length))

    fs.Close()

    Return ImageData


End Function

Problem ist, ich bekomme die folgende Fehlermeldung auf "Zurück ImageData':

Value of type '1-dimensional array of Byte' cannot be converted to 'Byte'.

Ich habe mit ihm zu spielen, aber kann nicht scheinen, um herauszufinden, was ich tun müssen, um Bilddaten.

InformationsquelleAutor | 2011-05-11

Schreibe einen Kommentar