Q:

c# nameof original parameter is being overwritten

I am trying to make checking for null exceptions easier, so I created this static method:
/// <summary>
/// Static method for throwing multiple argument null exceptions
/// </summary>
/// <param name="arguments">An array of arguments</param>
public static void ArgumentIsNull(params object[] arguments)
{

    // For each argument, if the argument is null, throw an error
    foreach (var argument in arguments)
        if (argument == null)
            throw new ArgumentNullException(String. Format(Resources. ArgumentNullException, nameof(argument)));
}

The problem is, my error looks like this:

You're missing the required parameter: argument

I know this is because of the parameter name I am looping through
var argument in arguments

What I would like to do is get the name of the argument that was passed. 
For example, here is a call to this method:
/// <summary>
/// Default constructor
/// </summary>
/// <param name="unitOfWork"></param>
/// <param name="service"></param>
/// <param name="apiKey"></param>
public SendGridProvider(IUnitOfWork unitOfWork, EmailService service, string apiKey) 
    : base(apiKey, "https://api.sendgrid.com/v3/")
{

    // Throw an error if our key is not provided
    ThrowIf. ArgumentIsNull(unitOfWork, service, apiKey);

    // Assign our fields
    this.apiKey = apiKey;
    this.service = service;
    this.unitOfWork = unitOfWork;
}

so if the unitOfWork is null, I would like the error to be

You're missing the required parameter: unitOfWork

How can I achieve this? 

A:

Unfortunately there is no reliable way to do that (unless you use some custom post compile code weaving tool).  nameof( is resolved at compile time and the passed in variables are set at run time. 
In a optimized build the local variables don't even have their original variable names anywhere in the compiled IL code. 
Here is a example of a Fody extension that does basic NameOf functionality via code weaving, perhaps you could extend what it does to have it look at what is being passed in and pass along a string[] to grab the parameter names. 

A:

public static void ThrowIfNull<T>(params Expression<Func<T>>[] exprs)
{
    foreach(var expr in exprs)
    {
        var member = expr. Body as MemberExpression;
        var name = member. Member. Name;
        var value = expr. Compile()();
        if (value == null)
        {
            throw new ArgumentNullException(name);
        }
    }
}

This isn't directly possible owing to nameof just getting the name of the variable, but you can always abuse expressions! 
Calling it would look like:
public void DoSomething(string x, string y)
{
    Ext. ThrowIfNull(() => x, () => y);
}

Bear in mind, having a typed method will restrict calling it to using expressions sharing the same generic type (or common subtype / interface). 
Just drop the generic type and use object, to support different typed expressions:
void ThrowIfNull(params Expression<Func<object>>[] exprs)

