DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

.NET program to convert array of integers into comma separated string

By Ashok Nalam on 11 Apr 2014 | Category: VB.NET | Tagged: C# VB.NET array string 
This program shows how to convert array of Integers into comma separated string using C#.NET and VB.NET examples.
  Discuss Add Comment   |  
Add rating Rate this resource   

Introduction

This program shows how to convert array of Integers into comma separated string using C#.NET and VB.NET.

C#.NET Program:

using System;
namespace DotNetMirror
{
    class ArrInt2CommaSepVal
    {
        public static void Main()
        {
            int[] numbers = new int[5] { 1111, 2222, 3333, 4444, 5555 };
            var commasepStr = string.Join(",", numbers);
            Console.WriteLine(commasepStr);
            Console.ReadLine();
        }
    }
}

VB.NET Program:

Namespace DotNetMirror
	Class ArrInt2CommaSepVal
		Public Shared Sub Main()
			Dim numbers As Integer() = New Integer(4) {1111, 2222, 3333, 4444, 5555}
			Dim commasepStr = String.Join(",", numbers)
			Console.WriteLine(commasepStr)
			Console.ReadLine()
		End Sub
	End Class
End Namespace

Output:

1111,2222,3333,4444,5555

  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9226  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (3)
 
1. By ZAP on 12 Aug 2023

 
2. By ZAP on 23 Oct 2023

 
3. By ZAP on 23 Oct 2023

 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys