DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-beta.8" />

.NET API 413,656 bytes

 Activator<T>

public struct Activator<T> : ISupplier<T>
Represents implementation of ISupplier<T> that acts as activator of type with public parameterless constructor.
using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace DotNext { [StructLayout(LayoutKind.Auto)] public readonly struct Activator<[System.Runtime.CompilerServices.Nullable(2)] T> : ISupplier<T> where T : new { [System.Runtime.CompilerServices.NullableContext(1)] T ISupplier<T>.Invoke() { return new T(); } } }