When I convert an List to array and don't use the array farther in my code it appears to be automatically going to null
like this:
String[] arr = list.ToArray();
now when I put a break point after it and hover over 'arr' it doesn't show a value but when i do it like this:
String[] arr = list.ToArray();
MessageBox.Show(arr[1].toString());
and then hover over 'arr' it shows the items.
why is it automatically set to null? could it be something in debug options of visualstudio or something to save memory space.
debugged as release
when i type ?arr[1].ToString()
in the Immediate Window it says it does not exist in the current context