c# - How to get a list in a MessageBox? -


how can display contents of string list in body of message box?

here's have far:

list<string> = new list<string> {};  foreach (datagridviewcell cell in dgvc.selectedcells)  {      a.add(cell.value.tostring());  }   messagebox.show(a);  // doesn't work !? 

messagebox requires string not list

stringbuilder sb = new stringbuilder(); foreach (datagridviewcell cell in dgvc.selectedcells) {     sb.appendline(cell.value.tostring());  } messagebox.show(sb.tostring()); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -