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 -

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

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -