Skip to content

Add Guid.GetBytes(byte[]) and Decimal.GetBits(decimal d, byte[]) #18969

@danmoseley

Description

@danmoseley

@davidfowl commented on Sun Sep 18 2016

Today the supported way to get the byte[] representation of a guid is to use ToByteArray() https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Guid.cs#L893, which allocates a byte[]. Instead it would be great if there was an overload that could write into an existing byte[]


@mikedn commented on Mon Sep 19 2016

Guid.GetBytes(Span<byte>)?


@davidfowl commented on Sun Sep 25 2016

Would be even better. When Span<T> exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions