writing contents of array outside of loop
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: writing contents of array outside of loop

  1. #1
    Join Date
    Apr 2014
    Posts
    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

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,248

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center