Jump to content

Recommended Posts

Posted

Does anyone know VB.NET arrays?

 

I have homework that involves me reading in a list of scores from a file and putting them into an array and then doing calculation in the array.

 

Thanks,

Banana

Posted

Wouldn't they be somewhat similar to arrays in other languages? Seems like most of those languages have similar syntax for variable definitions and what not.

Posted

Sub Main()

Dim sport(5) As String

'declaring an array

sport(0) = "Soccer"

sport(1) = "Cricket"

sport(2) = "Rugby"

sport(3) = "Aussie Rules"

sport(4) = "BasketBall"

sport(5) = "Hockey"

'storing values in the array

WriteLine("Name of the Sport in the third location" & " " & sport(2))

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.