Trim Null
智能大石头 authored at 2023-09-20 23:08:45
511.00 B
X
#if NETFRAMEWORK || NETSTANDARD2_0
namespace System.Diagnostics.CodeAnalysis;

/// <summary>当返回指定值时可能为空</summary>
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class MaybeNullWhenAttribute : Attribute
{
    /// <summary>返回值</summary>
    public Boolean ReturnValue { get; }

    /// <summary>实例化</summary>
    /// <param name="returnValue"></param>
    public MaybeNullWhenAttribute(Boolean returnValue) => ReturnValue = returnValue;
}
#endif