You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -399,6 +399,36 @@ public static unsafe object GetUninitializedObject(
399
399
400
400
returnRuntimeImports.RhBox(mt,reftarget);
401
401
}
402
+
403
+
/// <summary>
404
+
/// Get the size of an object of the given type.
405
+
/// </summary>
406
+
/// <param name="type">The type to get the size of.</param>
407
+
/// <returns>The size of instances of the type.</returns>
408
+
/// <exception cref="ArgumentException">The passed-in type is not a valid type to get the size of.</exception>
409
+
/// <remarks>
410
+
/// This API returns the same value as <see cref="Unsafe.SizeOf{T}"/> for the type that <paramref name="type"/> represents.
Copy file name to clipboardExpand all lines: src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs
+48-2Lines changed: 48 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -438,6 +438,52 @@ public static void FixedAddressValueTypeTest()
0 commit comments