src/AppMotor.Core/Extensions/TypeExtensions.cs
/// <summary>
/// Returns the <see cref="MethodInfo"/> for the specified custom unary (i.e. one parameter/operand) operator
/// defined in this type. This method assumes that both operands are of this type. Returns <c>null</c>, if
/// the operator method doesn't exist.
/// </summary>
/// <param name="type"></param>
/// <param name="operator">The operator</param>
Returns the  for the specified custom unary  operator
defined in this type. This method assumes that both operands are of this type. Returns null
Returns the for the specified custom unary operator defined in this type . This method assumes that both operands are of this type . Returns null
[MustUseReturnValue]
    public static MethodInfo? GetOperator(this Type type, UnaryOperators @operator)
    {
        return type.GetMethod("op_" + @operator, BindingFlags.Public | BindingFlags.Static, new[] { type });
    }
[ MustUseReturnValue ] public static MethodInfo ? GetOperator ( this Type type , UnaryOperators @operator ) { return type . GetMethod ( " " + @operator , BindingFlags . Public | BindingFlags . Static , new [ ] { type } ) ; }
Returns the  for the specified custom unary (i.e.
Returns the for the specified custom unary ( i . e .
Type
this
@operator
UnaryOperators
type
None
operator
None