Question
How can I use asynchronous programming with those codes. Please use C# . public async void AsyncData() { string[] colnum = csvL[0].Split(','); for (int i
How can I use asynchronous programming with those codes. Please use C# .
public async void AsyncData() { string[] colnum = csvL[0].Split(',');
for (int i = 1; i < csvL.Length; i++) { string[] datatt = csvL[i].Split(','); for (int j = 2; j < datatt .Length; j++) { int numCase = Int32.Parse(datatt [j]); // if number of case is 0, It will not add to the list if (num != 0) { DateTime dt = Convert.ToDateTime(colnum [j]); var dateO = dt.Date.ToString("MM/dd/yyyy"); listOfData.Add(new DataClass { Contry = datatt [1], State = datatt [0], NumberCase = num, ConfirmedData = dateO }); //put all contry list listCon.Add(datatt [1]); } } } // remove duplication of contry from list and show to combobox searchComboBox.ItemsSource = conutryList.Distinct().ToList(); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started