Allie Technology corner
Thursday, June 27, 2019
c# Convert a comma separate string into astring array and loop
string fruit = "Apple,Banana,Orange,Strawberry";
string[] split = fruit.Split(',');
foreach (string item in split)
{
Console.WriteLine(item);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment