var item = lstTasks.SelectedItem as DataRowView;
if(item == null)
return throw new NullReferenceExeption(nameof(item));
var resultId = item.TryGetValue("id", out int id);
var resultName = item.TryGetValue("name", out string name);
if(resultId && resultName)
DeleteTask(id.ToString(), name);
var listStr = JsonConvert.SerializeObject(new List<Any>());
Properties.Settings.Default.MyList = listStr;
listStr = Properties.Settings.Default.MyList;
var list = JsonConvert.DeserializeObject<List<Any>>(listStr);