Skip to content

Commit

Permalink
Limit to classes
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed May 27, 2022
1 parent 2233327 commit 96d0bde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Framework/Extensions/ObjectExtensions/ObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public static T AsNonNull<T>(this T? obj)
/// <summary>
/// If the given object is null.
/// </summary>
public static bool IsNull<T>(this T obj) => ReferenceEquals(obj, null);
public static bool IsNull<T>(this T obj) where T : class => ReferenceEquals(obj, null);

/// <summary>
/// <c>true</c> if the given object is not null, <c>false</c> otherwise.
/// </summary>
public static bool IsNotNull<T>(this T obj) => !ReferenceEquals(obj, null);
public static bool IsNotNull<T>(this T obj) where T : class => !ReferenceEquals(obj, null);
}
}

0 comments on commit 96d0bde

Please sign in to comment.