Files
SabreTools.Serialization/SabreTools.Serialization/ObjectExtensions.cs
2025-07-24 09:31:28 -04:00

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