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);
}
Posted by Smith Family at 10:55 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2019 (21)
    • ►  September (3)
    • ►  July (2)
    • ▼  June (16)
      • c# Convert a comma separate string into astring ar...
      • c# Create Datatable
      • c# add Colunm to Datatable and populate with same ...
      • c# remove last row on a datatable
      • SQL - script to generate c# class
      • c# SFTP download all files
      • c# SFTP List all Files
      • c# Method to send email with attachment
      • c# utility to log in a text file
      • c# Convert a non delimited txt file to a DataTable
      • c# replace function
      • c# Convert DataTable to CSV File
      • c# Convert CSV file to DataTable and sort DataTable
      • c# Move file to different directory
      • c# - Loop through files in a directory
      • Welcome
Travel theme. Powered by Blogger.