c# - messagebox to show many variables in a list -


how show list (how use messagebox show numbers under each other )

 list<int> numbers =new list<int>();                 numbers.add(2);                 numbers.add(4);                 numbers.add(6);                 numbers.add(8); 

use string.join insert newline between each number.

messagebox.show(string.join(environment.newline, numbers)); 

http://i.imgur.com/vehpu35.png

the resulting string displayed is: "2\r\n4\r\n6\r\n8"


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -