Display List items?
-
Hello All , Is there a way to display list (containing strings) items in a message box?
List test = new List();
test.add("one");
test.add("two");
test.add("three");And then displaying all the list items together in a single message box? Like
MessageBox.Show(test); // ??
Thanks, -
Hello All , Is there a way to display list (containing strings) items in a message box?
List test = new List();
test.add("one");
test.add("two");
test.add("three");And then displaying all the list items together in a single message box? Like
MessageBox.Show(test); // ??
Thanks,Not as far as I am aware. However, a Messagebox is nothing much more than a Dialog. Design your own.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Hello All , Is there a way to display list (containing strings) items in a message box?
List test = new List();
test.add("one");
test.add("two");
test.add("three");And then displaying all the list items together in a single message box? Like
MessageBox.Show(test); // ??
Thanks,Following is basic example to do so.
MessageBox.Show(string.Concat(test.ToArray()));
You can explore more to fulfill your requirement or to customize it at whatever level you need. Hope this will help!
Jinal Desai - LIVE Experience is mother of sage....
-
Hello All , Is there a way to display list (containing strings) items in a message box?
List test = new List();
test.add("one");
test.add("two");
test.add("three");And then displaying all the list items together in a single message box? Like
MessageBox.Show(test); // ??
Thanks,try
MessageBox.Show(string.Join(Environment.NewLine,test.ToArray()));
:)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.