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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!