?
Solved

MessageBox.Show ArrayList?

Posted on 2008-02-03
2
Medium Priority
?
795 Views
Last Modified: 2012-05-05
I would like to display the contents of a small Array or ArrayList within ONE MessageBox.Show , but I don't want several boxes opening.

Help...
0
Comment
Question by:kvnsdr
2 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 500 total points
ID: 20810049
Try this:
StringBuilder sb = new StringBuilder();
int index = 0;
while ( index < strings.Count)
{
   sb.Append(strings[index++] + "\n");
}
string textToShow = sb.ToString();

Jim
0
 
LVL 1

Author Comment

by:kvnsdr
ID: 20823033
Excellent....
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question