Baris.NET
Showing posts with label
c#
.
Show all posts
Showing posts with label
c#
.
Show all posts
Wednesday, March 21, 2007
.NET: Combine array items into a string (deliminated with comma)
So, here is the quick way to achieve it:
ArrayList arr
= new
ArrayList()
;
arr.Add(
"test1"
)
;
arr.Add(
"test2"
)
;
arr.Add(
"test3"
)
;
//be sure all elements are string
string
str
=
String.Join(
","
, (
string
[]) arr.ToArray(Type.GetType(
"System.String"
)))
;
MessageBox.Show(str)
;
// test1,test2,test3
Older Posts
Home
Subscribe to:
Comments (Atom)