+ 1
ToArray() method ??
Does the ToArray() method when used with Dictionary/ HashSet/Stack or Queue copy the list into a new array, array as in the first form of array we learned? Or.. was a little hard for me grasp
5 Respuestas
+ 2
Any Array is static array only...
+ 2
You can apply dictionary methods on dictionary. And queue methods on queue only..
Then what do you mean 'no longer'?
See if q is queue, d is a dictionary then if possible you can make array like
var arr = q.ToArray(); or
var arr = d.keys().ToArray();
Now "arr" is an array. The q, d are still originals. You are not changed so you can apply d.Cobtains(key) ; but you cant apply arr.Contains(key) ; not valid dict method on array...
+ 1
Edit to question, would it be stored in an array of Static memory allocation or dynamic?
+ 1
So it does no longer take in methods that are used for (example) Queues or Dictionaries .. like .ContainsKey(K key)
+ 1
Ohhh thank you!