Is there any basis for the names Shared and Default? #111622
Replies: 2 comments 2 replies
-
It's not as "safe" as the methods on List<int> list = [1, 2];
Span<int> span = CollectionsMarshal.AsSpan(list);
span[0] = 42;
Console.WriteLine(list.Contains(42)); // will be true
list.AddRange([3, 4, 5, 6, 7, 8, 9, 10]);
span[0] = 84;
Console.WriteLine(list.Contains(84)); // may be false |
Beta Was this translation helpful? Give feedback.
-
Under my impressions, |
Beta Was this translation helpful? Give feedback.
-
Some types provide entry points for static instance retrieval, but they have different names. What is the basis for choosing this name.
By the way, CollectionsMarshal.AsSpan(), This feature can be a LIst method or an extension method. Is there any basis for the common method of ultimately choosing to make him a separate class
Beta Was this translation helpful? Give feedback.
All reactions