PC Review


Reply
Thread Tools Rate Thread

How to Declare Bytes in VB. Net

 
 
Stephen
Guest
Posts: n/a
 
      24th Nov 2004
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      24th Nov 2004
"Stephen" <(E-Mail Removed)> schrieb
> 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)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to declare a pointerto an array of bytes =?Utf-8?B?RGF2ZQ==?= Microsoft C# .NET 9 26th Oct 2005 08:27 PM
W2k BUG: performance counters log [Network interface: Bytes Received/Sec, Bytes Sent/Sec] Ms Microsoft Windows 2000 0 4th Jul 2004 12:36 AM
W2k BUG: performance counters log [Network interface: Bytes Received/Sec, Bytes Sent/Sec] Ms Microsoft Windows 2000 Networking 0 4th Jul 2004 12:36 AM
uploading 40mil bytes, downloading 5mil bytes why? =?Utf-8?B?ZGF2ZWc=?= Windows XP Help 0 16th Dec 2003 07:11 AM
[HELP] data corruption: swap of bytes distant from 12 bytes Francois Grieu Windows Networking 0 17th Nov 2003 05:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 PM.