473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

initialize an array with a specific value (calloc?)

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

Dec 22 '06 #1
1 1798
Dim hashWithSaltBytes() As Byte = _
New Byte(hashBytes.Length + _
saltBytes.Length - 1) {}
"Kevin" <ke**********@lycos.co.ukwrote in message
news:11*********************@h40g2000cwb.googlegro ups.com...
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

Dec 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bell | last post by:
Is there a way to copy an array items' value (like clone) to another array? Currently the array.clone() and System.arraycopy() are only copy the iten reference. Jun
1
by: praba kar | last post by:
Dear All In Php we can find in_array() function which function is mainly useful to check whether a specific value is exist in the array or not. But In python In cannot find any function like...
41
by: Berk Birand | last post by:
Hi, I am just learning about the array/pointer duality in C/C++. I couldn't help wondering, is there a way to pass an array by value? It seems like the only way to do is to pass it by...
1
by: Marcel Linnenfelser | last post by:
Hi, how can I get the number of data sets with a specific value for a whole table? I want to have a statement that gives me a result set where each data set tells me the value and the count of...
4
by: wg | last post by:
I am attempting to create an array of value types but seem to be haveing a problem referencing it. I have created a class Public Class Tags Private _Name As String Private _Address As String ...
3
by: shobu | last post by:
passing array checkbox value and update the database <?include 'dbconnect.php'; error_reporting(0);$update_qr="update...
14
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is...
5
by: MrMob | last post by:
I would like to update thousand of Rows with its specific value Suppose i have a table XYZ and ABC XYZ contains Code,Name,RegDate And ABC also Contains the same but the Value of RegDate of XYZ...
1
by: Drummin | last post by:
How do I get user id from radio button name in an array. The value is a variable. So this section repeats in an array and when submitting the ID and value is passed for each user in the array. echo...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.