initialize an array with a specific value (calloc?)

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Hi

I am specifying a byte array of known size using
Dim data(100) As Byte

which creates an array with 0's. I would like to create the array with
a specific value instead of zeros, if my memory serves me correctly
this is like calloc (or is it malloc?) in c. What is the fastest way
to do this in vb .net?
Thanks
Kevin
 
Dim hashWithSaltBytes() As Byte = _
New Byte(hashBytes.Length + _
saltBytes.Length - 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