Hello sir,
how to change this coding to vb.net coding?

Stream photoStream = PhotoUpload.PostedFile.InputStream;
    int photoLength = PhotoUpload.PostedFile.ContentLength;
    string photoMime = PhotoUpload.PostedFile.ContentType;
    string photoName = Path.GetFileName(PhotoUpload.PostedFile.FileName);
    byte[] photoData = new byte[photoLength];
    photoStream.Read(photoData, 0, photoLength);

Recommended Answers

All 2 Replies

Use this link - http://www.developerfusion.com/tools/convert/csharp-to-vb/

Dim photoStream As Stream = PhotoUpload.PostedFile.InputStream
Dim photoLength As Integer = PhotoUpload.PostedFile.ContentLength
Dim photoMime As String = PhotoUpload.PostedFile.ContentType
Dim photoName As String = Path.GetFileName(PhotoUpload.PostedFile.FileName)
Dim photoData As Byte() = New Byte(photoLength - 1) {}
photoStream.Read(photoData, 0, photoLength)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.