✅ Array Assignment Error
I'm iterating over a list of classes, and in each class, there's a property that is an array which I iterate over and remove anything that matches what I want to remove. Originally, I did a .Where() for comparison and then .ToList() which I iterated over and did a Array.Clear on the original array. But that just leaves behind null classes in the Array.
So I changed my approach, converted the array to a list and did a remove all. I want to set the original Array equal to this List<T>.ToArray(), but when I try that, I get "the Left-hand side of an assignment must be a variable, property or indexer" error.
So I changed my approach, converted the array to a list and did a remove all. I want to set the original Array equal to this List<T>.ToArray(), but when I try that, I get "the Left-hand side of an assignment must be a variable, property or indexer" error.