How to Declare Bytes in VB. Net

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

Hi,
I code in C# and I have a problem in VB.NET
how do i declare bytes in VB.Net
the code in C# is as follows

string fileName;
int fileSize;
string contentType;
byte[] fileData; <--- how do I define this?
fileName = rd.GetString(0);
fileSize = rd.GetInt32(1);
contentType = rd.GetString(2);

fileData = new Byte[fileSize]; <---- and this
rd.GetBytes(3, 0, fileData, 0, fileSize);

I am stuck at simple declarations...

thanks,
Stephen
 
Stephen said:
I code in C# and I have a problem in VB.NET
how do i declare bytes in VB.Net
the code in C# is as follows

string fileName;
int fileSize;
string contentType;
byte[] fileData; <--- how do I define this?

'Dim FileData() As Byte'.
fileName = rd.GetString(0);
fileSize = rd.GetInt32(1);
contentType = rd.GetString(2);

fileData = new Byte[fileSize]; <---- and this

'ReDim FileData(FileSize - 1)'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top