TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sherwin Hamidi
NA
19
0
[Newbie] Arraylist Issue...please help
Feb 6 2007 4:12 PM
So I'm new to C#, haven't used C++ in a while and when I did I had the luxury of VS 2003....not anymore....don't ask why, but these are the times I'm in.
So I have an ArrayList which I'm 99% positive is populated correctly in one class -- I passed it to another class with a simple Get and now I'm trying to do nothing but System.Console.Writeline the data in the ArrayList.
Here's the thing -- the ArrayList is composed of many arrays -- each array has n elements so in essence I've created a matrix. To display this matrix (after defining the ArrayList of course) I've used this simple function which I'm sure everyone has seen before.
public static void PrintValues( IEnumerable myList )
{
foreach ( Object obj in myList )
Console.Write( " {0}", obj );
Console.WriteLine();
}
Here's where my lack of C# knowledge comes in. The only thing being printed in my Output box at this moment is the first element in the array.....the other n-1 elements are not being printed. So for each array I'm getting the first element, (so right now 26 individual strings are being printed since I have 26 arrays in my ArrayList) but I need to know how to get access to the other n-1 elements in the individual arrays! Can anyone help?
Reply
Answers (
5
)
Get Property Values from database in PropertyGrid...
RSACryptoServiceProvider exception