We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5938991 commit 76fac9eCopy full SHA for 76fac9e
src/DotNext/Runtime/Intrinsics.cs
@@ -27,11 +27,7 @@ public static class Intrinsics
27
/// <typeparam name="T">The type to check.</typeparam>
28
/// <returns><see langword="true"/> if <typeparamref name="T"/> is nullable type; otherwise, <see langword="false"/>.</returns>
29
[MethodImpl(MethodImplOptions.AggressiveInlining)]
30
- public static bool IsNullable<T>()
31
- {
32
- Unsafe.SkipInit(out T value);
33
- return value is null;
34
- }
+ public static bool IsNullable<T>() => default(T) is null;
35
36
37
internal static ref TTo InToRef<TFrom, TTo>(scoped ref readonly TFrom source)
0 commit comments