No intellisence for Span<T>'s GetPinnableReference method
Options
For following code (install latest version of
System.Memory
):
Span<byte> buffer = stackalloc byte[1024];When I type
// No intellisence for: buffer.Get...
buffer.GetPinnableReference().Dump();
buffer.Get
, there is no intellisence out there(should list a GetPinnableReference
), and the code is working. Comments
-
GetPinnableReference is decorated with the EditorBrowsable attribute, State = Never:
[EditorBrowsable((EditorBrowsableState) EditorBrowsableState.Never)] public unsafe ref T GetPinnableReference();
See also:
https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.editorbrowsablestate?view=netframework-4.8This class is used by a visual designer to determine what is visible to the user. For example, the IntelliSense engine in Visual Studio never shows methods or properties that are marked as Never. -
Thanks, make perfect sense to me.