mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 22:29:28 +00:00
Fix from managed to fixed array
This commit is contained in:
@@ -127,7 +127,7 @@ public class FixedArrayGenerator : IIncrementalGenerator
|
||||
builder.AppendLine(" }");
|
||||
builder.AppendLine(" }");
|
||||
builder.AppendLine();
|
||||
builder.AppendLine($" public static {structName} FromBytes(byte[] array)");
|
||||
builder.AppendLine($" public static {structName} From{capitalizedType}Array({targetType}[] array)");
|
||||
builder.AppendLine(" {");
|
||||
builder.AppendLine($" var arr = default({structName});");
|
||||
builder.AppendLine(" array.AsSpan().CopyTo(arr.AsSpan());");
|
||||
|
||||
Reference in New Issue
Block a user