PremiumBill x = list.OrderBy(j => j.PostingDate).FirstOrDefault(j => j.PostingDate >= input.PostingDate);
Hello I'm trying to save a value from the array in a variable to preserve it while the array is changing but the variable's value is changing with its change. I have tried
PremiumBill[] temporaryList = (PremiumBill[])List.ToArray().Clone();
PremiumBill x = temporaryList.OrderBy(j => j.PostingDate).FirstOrDefault(j => j.PostingDate >= input.PostingDate);
I tried copy to and got the same thing