mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-17 05:45:38 +00:00
18 lines
390 B
C#
18 lines
390 B
C#
#if NETCOREAPP
|
|
|
|
using System;
|
|
|
|
namespace SabreTools.Serialization
|
|
{
|
|
/// <summary>
|
|
/// Extensions for generic object types
|
|
/// </summary>
|
|
/// <see href="https://stackoverflow.com/a/72775719"/>
|
|
internal static class ObjectExtensions
|
|
{
|
|
public static T ThrowOnNull<T>(this T? value) where T : class => value ?? throw new ArgumentNullException();
|
|
}
|
|
}
|
|
|
|
#endif
|