dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

MemoryMarshal.AsRef should document that ArgumentOutOfRangeException can occur

Open steveharter opened this issue 6 months ago • 0 comments

Type of issue

Missing information

Description

Similar to Read(), ArgumentOutOfRangeException can be thrown if the span is not large enough with text like 'Specified argument was out of the range of valid values. (Parameter 'length')'

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.memorymarshal.asref?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Runtime.InteropServices/MemoryMarshal.xml

Document Version Independent Id

7105394a-89da-4a33-ebd6-141172663867

Article author

@steveharter

steveharter avatar Aug 20 '24 16:08 steveharter