C # UWP Windows 10
There is such code:
private ObservableCollection<GroupInfoList> GroupedTags = new ObservableCollection<GroupInfoList>(); private void Refresh() { GroupedTags.Clear(); foreach (var x in GetGroupedTags()) GroupedTags.Add(x); } When any attempt to add or remove an item of a collection, the application crashes, the VisualStudio debugger does not show anything, the catch does not work. One time an error appeared: something like "... most likely indicates that the memory is damaged."
I tried to run the application on 2 computers and a phone - the result is the same everywhere.
Moreover, if you perform the operation = then all the rules, it falls on the lines:
GroupedTags.Add(x);GroupedTags.Remove(x);