public static void SendInput(Input[] inputs)
{
// Check if the array passed in parameter is not empty
if (inputs != null && inputs.Length != 0)
{
if (NativeMethods.SendInput(inputs.Length, inputs, MarshalType<Input>.Size) == 0)
throw new Win32Exception("Couldn't send the inputs.");
}
else
{
throw new ArgumentException("The parameter cannot be null or empty.", "inputs");
}
}