09:00-16:00 19:00-23:00 10:00-17:00 20:00-24:00 07:00-14:00
string line; while ( (line=reader.ReadLine()) != null) { // this is a first list schedule_initially.Add(line); } // Thsi is the second list List<string> final_schedule = new List<string>(); ArrayList sch= new ArrayList(); foreach (string s in schedule_initially) { if(s !=null) sch.Add(s.Split('-')); } foreach (string v in sch) { final_schedule.Add(v); } // Show the result to a label foreach (string s in final_schedule) { label1.Text += "\n" + s; }
final_schedule = schedule_initially.SelectMany(x => x.Split('-')).ToList();
s.Split('-')
sch.Add(s.Split('-'))
string[] temp = s.Split('-')); for each (string s in temp) { sch.Add(s); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)