-
April 5th, 2014, 07:58 PM
#1
writing contents of array outside of loop
Hello,
I am taking a c# class and one of my assignments is at the end of my program I need to write out to the console the contents of 2 arrays. All of the names in the array should be listed with a score which is in a different array like this:
scott 10
bob 20
ted 40
I am able to enter all of my names and break out of my loop but when it comes to writing it to the screen in one block I am getting an error that my counter "i" does not exist in the current context.
If I put the code in the loop I have no issue but it doesn't display the way I want.
Any suggestions are appreciated.
Thanks,
Scott
-
April 6th, 2014, 04:51 PM
#2
Re: writing contents of array outside of loop
Post your code using code tags so we can take a look at what you have.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|